Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Automation -- Bookmarks vs. MailMergeFields
Message
 
 
To
31/08/1998 23:30:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00131232
Message ID:
00131949
Views:
26
>So is there any way to overwrite the text _within_ the bookmark without overwriting the bookmark?

I have not found a way, but here is something I did to get around it:

goWord = GETOBJECT(,Word.Application)
...
lcName = loBookMark.Name
lcConvertText = loBookMark.Range.Text
*-- >>Modify contents of bookmark
..
loBookMark.Select()
goSel = goWord.Selection
goSel.MoveRight(1)
goSel.TypeText(CHR(13))

LOCAL lnStart
lnStart = goSel.Start
goSel.TypeText(lcConvertText)
goSel.Start = lnStart

loBookMark = goWord.ActiveDocument.BookMarks.ADD(lcName+"A",goSel.RANGE)
goSel.MoveRight(1)



>But my biggest problem remains the fact that contiguous bookmarks get merged when one is overwritten.
>

TypeText a CHR(13) between them
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform