Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export to MS Word - paragraph marks

Status
Not open for further replies.

GingerR

MIS
Apr 17, 2001
3,134
US
I'm exporting a report to MS Word (rtf). The users will have to edit that frequently. However it seems when it converts to rtf, there's a paragraph mark at the end of every row of text, like this:

here's a pargraph of text that%
is one single paragraph so%
it won't wrap around%
when the user edits it.%
%
here's a second paragraph of text%
that the user also can't edit well.%
%

so when the user tries to edit, it doesn't wrap around like it would in a normal word doc. Anyone else ever have to deal with this? I need the paragraph marks within a paragraph to not exist, however some paragraph marks need to stay (header, in between paragraphs, etc)

Thanks--g



Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
GingerR,

I could be wrong, but I do not believe the are "paragraph marks" they are simply CRLF (carriage return line feed). Please see if these exist in you database field(s) you are using to populate the Word document.

Let me know...

[thumbsup2]

 
Oh, I believe, but have no explicit solution, except a "concept" - run a word macro that first replaces all single instances of enter with a space, then replace all instance of two spaces with one enter (perhaps the latter process on tree spaces first?)

Roy-Vidar
 
Hi Roy--I was thinking of something similar...somehow designating the 'real' end of a paragraph with some funky character (in access, pre-export), then in Word replace all paragraph marks with a blank, then replace the funky character with a paragraph mark. That's the approach I'm working on, but it's pretty difficult right now. I have headers and other pieces of output that only have one paragraph mark - they are only one sentence, and there should really be a second paragraph mark after it (all the way to the left, to make a 'blank' sentence in between 'real' paragraphs) but the converter instead of making a second paragraph mark for 'blank' row between details, it makes the Paragraph setting in Word be like "6 above". yikes. I'm just going to keep playing with it.

HitchUser--it's a regular Access report, no subreports or anything. A few headers. Some fields are MEMO and can be lots of words. I have a custom toolbar with a button that uses docmd.outputTo (rtf) that the user hits during PREVIEW of the report.

If I manually copy data from Access and paste it into Word, it's fine. No crazy paragraph marks.

Thanks--g

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks for everyone's help. HitechUser--I've used the lebans one before, but it all comes out like one big graphic and isn't editable. Thanks though for the effort. I really appreciate everyone's ideas.

I was hoping for an easier solution, but since you guys mentioned the same idea I had, I concatenated a hopefully never-used-by-the-users character • (alt+0149) in the Access report wherever I want a paragraph mark to be when the doc is in it's final state. I took out all verticle spacing in the Access report and used the • instead. So the Access report looks bad: the bullet shows as a thick black rectangle and all the text is smashed up vertically so no vertical spacing (any spacing translates into changing the 'paragraph format' in MS Word to be like "6 pt above"). But I'll show the 'pretty' Access report to the Focal, then when they hit the button I'll export the 'ugly' one.

Then I added to an existing macro in MS Word (i record then tweak) that replaces all paragraphs (^p) with blanks, then replaces the bullets with paragraph marks. I also deleted all page breaks (^m) since the two Focals will be editing and those will get in the way. Now the final Word doc ends up with a single space (^p) between each paragraph, no paragraph marks at the end of each line of text, and in one big chunk (no page breaks) so the Focals can tweak it as they wish. They are happy and it takes them very little time to tweak it. The main jist of this exercise was that 50 users are entering their info into the db now instead of submitting multiple different MS Word docs to the two Focals in mulitple diff formats for the focals to compile and sweat over.

Now I just have to hope no one ever uses alt+0149 :)

Thanks again--g

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top