Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Auto: Delete after bookmark deletes bookmark
Message
From
18/04/2008 16:36:09
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Word Auto: Delete after bookmark deletes bookmark
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01311800
Message ID:
01311800
Views:
95
Hi all,

More Word automation stuff: code loops through 3 bookmarks in a Word template and a) deletes all the text after the bookmark to the end of the line (it is just a label for "non-automation" use) and then b) inserts some data.

Works mostly okay except for some reason the very 1st bookmark in the document gets deleted when I issued the Selection.Delete() (after extending the selection to the end of the line).

I tried moving the selection 1 char to the right before extending it to the end of the line (so as to be "off" the bookmark) but this puts the insertion point a char 2 which is not correct.

Bookmarks 2 and 3 work okay as somehow they are different.

Ideas of a workaround?

Albert
Next
Reply
Map
View

Click here to load this message in the networking platform