Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Automation, cr/lf not respected
Message
From
22/02/2007 05:34:00
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01197789
Message ID:
01197891
Views:
15
>Hi all,
>
>I'm sure someone has an answer for me here.
>
>I have a Word document that I have to do some automation with... So, I have some place-holders in there like {{SOMEFIELD}} where I need to do some inserting of stuff and can successfully do using find/replace automation.
>
>Here's the problem. If the text I have has ANY cr/lf (such as a multi-line address), the Word document doesn't properly reflect that, almost like the cr/lf is treated as a non-printable character and doesn't advance to the next line.
>
>Am I missing something stupid???
>
>Thanks,
>
>Don

Don,
If instead of such placeholders you use document variables or bookmarks then you don't need to do find/replace at all.
Set document variable's value, or insert into bookmark directly. It'd also be faster than a find/replace.

PS: If you'd use find/replace then you should use special characters for things like line feed (ie: ^p).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform