M
M.L.Srinivas
I'm using late binding for creating word application
(sugeested by Jonathan West) and trying to insert a field
in the activedocument from VB.
I'm using the following code:
Set myfield = WordApp.ActiveDocument.Fields.Add
(Range:=WordApp.Selection.Range, _
Type:=wdFieldDocProperty, Text:="ServiceDate
\@ ""MMMM dd, yyyy""")
WordApp is my word object created thru late binding. The
above code is not working (it's working fine in case early
binding with word reference)
The error is 'Value out of range'.
Can anybody suggest..how to use selection in case of late
binding and what's wrong in the above case.
Thanks,
M.L.Srinivas
(sugeested by Jonathan West) and trying to insert a field
in the activedocument from VB.
I'm using the following code:
Set myfield = WordApp.ActiveDocument.Fields.Add
(Range:=WordApp.Selection.Range, _
Type:=wdFieldDocProperty, Text:="ServiceDate
\@ ""MMMM dd, yyyy""")
WordApp is my word object created thru late binding. The
above code is not working (it's working fine in case early
binding with word reference)
The error is 'Value out of range'.
Can anybody suggest..how to use selection in case of late
binding and what's wrong in the above case.
Thanks,
M.L.Srinivas