I have a VBA code that gives a value in a variable and then adds the variable in a document
Dim NoGFIs As Integer
NoGFIs = 1
ActiveDocument.Variables.Add Name:="GFIs ", Value:=NoGFIs
and I used a conditional statement in the word document
No of GFIs: {DOCVARIABLE GFIs}
Check IF: {IF <<GFIs>> = 1 "ONE" "NOT ONE"
But the outcome shows that something is wrong:
No of GFIs: 1
Check IF: NOT ONE
It shows that the GFIs value gets out from the VBA to the document, but IF fails to evaluate it?? Has anyone seen anything like that before?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.