Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
When you do a select (Or toggleselect) in a macro) you pass your value as such:
ActiveDocument.Fields("Date").Select("10/2/2010")
But what if i want to pass a variable through there? Like this:
My variable looks like this "vDate = 10/2/2010"
Code (VB):
Sub SelectDate
ActiveDocument.Fields("Date").Select("=$(vDate)")
End Sub
Is this possible, Is there a way around that, without using v9 (Actions), My client is on 8.5.
Thanks,
sorry,
try that:
Sub Sup
set q = ActiveDocument.fields("Year")
set v = ActiveDocument.GetVariable("vMonth")
q.Select v.GetContent.string
End Sub
Hello
try that:
set q = ActiveDocument.fields("Date")
set v = q.GetVariable("vDate")
q.Select v.GetContent.string
Sorry but it came back with an error :Object doesn't support this property or method: 'q.GetVariable'"
Sub Sup
set q = ActiveDocument.fields("Year")
set v = q.GetVariable("vMonth")
q.Select v.GetContent.string
End Sub
Please assist.
sorry,
try that:
Sub Sup
set q = ActiveDocument.fields("Year")
set v = ActiveDocument.GetVariable("vMonth")
q.Select v.GetContent.string
End Sub