Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following script macro vb
- Doc.FIelds("Date").SELECT A.GetContent.STRING
SET Field = Doc.Fields(FieldName).GetPossibleValues
FOR i=0 to Field.Count-1
- Doc.Fields("CodeGroupe").Clear
- Doc.FIelds(FieldName).SELECT Field.Item(i).Text
SET FlagStockSiteManquant = ActiveDocument.Variables("vFlagStockSiteManquant")
FlagStockSiteManquant = FlagStockSiteManquant.GetContent.STRING
SET Flag = ActiveDocument.Variables("vFlag")
Flag = Flag.GetContent.STRING
SET Nom = ActiveDocument.Variables("vName")
Nom = Nom.GetContent.STRING
SET Mail = ActiveDocument.Variables("vMail")
Mail = Mail.GetContent.STRING
SET Reference = ActiveDocument.Variables("vReference")
Reference = Reference.GetContent.STRING
- Doc.FIelds("Code Reference").SELECT Reference
NEXTNEXT
How could I verify if Field.Item(i).Text still possible to select after select Reference ? I some case Field.Item(i).Text could not be selected after I select Reference and return wqrong values when export .
Not really sure, but the reference doesn't seem to change during your for loop, is this true?
Maybe get all variables in the beginning of your code, and set the reference to code reference before retrieving the possible values for FieldName.
No , reference change for every Field.Item(i).Text