Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SaveAs2 in Word
#1
Hi,

I am trying to save a MS Word document as the old 97-2003 format.
I am getting the error:
expected VARIANT*
tip: use operator & to get address of variable, or operator + to cast type.
Can you tell me what I am missing?
Thanks
Code:
Copy      Help
typelib Word {00020905-0000-0000-C000-000000000046} 8.5
Word.Application w._getactive
str fileName1="Test file 02.doc"
w.ActiveDocument.SaveAs2(fileName1 0 @ @ @ @ @ @ @)
#2
Try to change str to VARIANT.
#3
I get the error:
0x800706F4, A null reference pointer was passed to the stub.
when using VARIANT or VARIANT*

Thanks
#4
Probably argument 2 must be variable containing 0, not simply 0. Look in status bar. If it is with &, must be variable.


Forum Jump:


Users browsing this thread: 2 Guest(s)