Peter Mayer Posted July 19, 2011 Posted July 19, 2011 About a year ago I was putting together the program for a conference and tried to generate the section with paper abstracts directly from FM. As has often been noted here, FM isn't a word processor, and the results were not pretty and were rejected by my fellow conference organisers as unsuitable. What to do? My work-around involved going back into the bowels of RTF, but the solution is a general one which can be adapted to export formatable text to MS Word. Step 1 was to modify the variables I was exporting to have RTF prefixes and suffixes and to put them into a new layout: rtf~fullname "\s1 {\b " & Full Name & "} \par" rtf~Institution "\s2 " & Institution & " \par" rtf~date&time "\s2 " & Day::Day Name & " " & Session Times::Session Time & " \par" rtf~Title "\s1 {\b " & Paper Title & "} \par" rtf~abstract "\s3 " & Summary & " \par" s1, s2 and s3 refer to style sheets to be defined in WORD. The other prefixes (e.g. \b turn on features such as 'bold'. \par creates a carriage return). Step 2 was simply to export them as a tab delimited text file. Because the file is tab delimited, it is easy to import it into Excel to check that all the fields line up as they should. Step 3 is to add the essential RTF header. It's easier to do this in a simple word processor Notepad which doesn't recognise RTF, but it can be done directly in WORD as well. The following header needs to be inserted at the top of the file, with the exported text going where indicated. {\rtf\ansi¶ {\fonttbl¶ {\f0\fswiss\fprq2\fcharset0 Arial;}¶ {\f1\froman\fprq2\fcharset0 Times New Roman;} } ¶ {\stylesheet ¶ { Normal;}¶ {\s1 Author~Title;}¶ {\s2 Uni;}¶ {\s3 Abstract;}¶} >>Insert rtf formatted text here<< } Step 4 is to save this file. Then replace the .txt suffix with .rtf. Step 5 is to open the file in WORD. The text should appear as formatted. The appearance of each exported field can be changed by editing the appropriate style sheet which should appear in the list of styles.
K1200 Posted July 26, 2011 Posted July 26, 2011 Thanks for the information. I've always found exporting formatted text to be a tricky proposition ... especially the Stylesheet component. Would you happened to have a generic one to go along with your sample structure?
Recommended Posts
This topic is 4867 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now