FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Word question
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Word question
Posted: Mon Oct 22, 2012 03:16 PM

Can someone please help me to convert this to FIVEWIN code:

ActiveDocument.SaveAs FileName:=strDocName, FileFormat:=wdFormatXMLDocument

Thanks in advance
Otto

Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: Word question
Posted: Mon Oct 22, 2012 05:22 PM
Code (fw): Select all Collapse
FUNCTION TEST
LOCAL oWord := WinWordObj()
LOCAL oDoc

oDoc := oWord:Documents:Add()
#define wdFormatXMLDocument 12
oDoc:saveas( "path where you want to save\FileName", wdFormatXMLDocument )
oWord:Quit()
RETURN NIL


or to be closer to the way you asked:

Code (fw): Select all Collapse
FUNCTION TEST
LOCAL oWord := WinWordObj()
LOCAL oDoc

oWord:Documents:Add()
oDoc := oWord:ActiveDocument

 #define wdFormatXMLDocument 12
oDoc:saveas( "path where you want to save\FileName", wdFormatXMLDocument )
oWord:Quit()
RETURN NIL
Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Word question
Posted: Mon Oct 22, 2012 05:40 PM

André,
thank you very much.
Now all is working so well.
Best regards,
Otto

Continue the discussion