Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bookmark only being partially replaced
Message
From
02/08/2011 07:14:27
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01519627
Message ID:
01519874
Views:
25
I'm pretty sure. If I open the document and choose "Go To Bookmark" the entire text in the bookmark is highlighted/selected.

UPDATE

I have got around the problem for now. The bookmarks were in a table, I deleted the table and recreated the bookmarks and things seem fine now. I had previously deleted and recreated the bookmarks only and that hadn't worked, so my current theory is there was something strange with the table the bookmarks were in.

>Are you sure you don't have 'al' next to bookmark?
>
>>
>>using VFP 9 SP2 and Word 2002.
>>
>>I've set up numerous bookmarks in a word document and use code like this to replace bookmarks with the values I need.
>>
>>
>>
	FOR lnCount = 1 TO m.lnCountMarks
>>		m.lcMarkName = UPPER(laMark[lnCount])
>>
>>		WITH m.loDoc.Bookmarks(m.lcMarkName).RANGE
>>
>>			DO CASE
>>			CASE m.lcMarkName == "EMPTOTAL"
>>				.TEXT = TRANSFORM(m.lnEnrolmentTotal, "@R 9,999,999")
>>
>>When I look at the resultant document I get a value like this:
>>
>>2al
>>
>>This is leaving the last two characters from EmpTotal as part of the .Text. When I step through the code, this:
>>
>>TRANSFORM(m.lnEnrolmentTotal, "@R 9,999,999") = " 2"
>>
>>and when the assignment taakes place, then
>>
>>.Text = " 2al"
>>
>>What!!!???
>>
>>I have this working for about 20 other bookmarks but only these 4 are doing this.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform