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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Word Doc and Paragraph marks

Status
Not open for further replies.

GingerR

MIS
Apr 17, 2001
3,134
US
I'm exporting a report from MS Access to MS Word (rtf, which is the only feasible choice). The users will have to edit that Word doc frequently. However it seems when it converts from Access 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). Obviously the user can manually delete these, which will be irritating for them, and sort of defeat the purpose of us automating this whole process anyhow.

Any ideas? I can fiddle with vba if you get me started on an idea. Thanks a ton.


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

Don't know off the top of my head whether you can do anything at the Access end - it might depend on how the report is designed.

The easiest process in a macro in Word is probably to Replace All [blue]^p^p[/blue] (two paragraph marks together) with some character not in the document; then Replace All paragraph marks with spaces and finally replace All the character you used back to single paragraph marks. Just record yourself doing it manually to get code.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
Hi Tony--that's what I was thinking of. But sometimes there's not two paragraph marks, instead the converter makes the 'paragraph' format have like 3 above or something. I'll keep goofing around with it using probably a combination of several ideas....

Thanks--g

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

So change 2 or more paragraph marks - use wildcards and replace all [blue]^13{2,}[/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top