Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bookmark only being partially replaced
Message
 
 
To
29/07/2011 14:46:48
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01519627
Message ID:
01519695
Views:
28
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.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform