Converting Microsoft .Docx to .txt
Posted: Wed Jan 16, 2008 11:28 pm
As I understand it, MS Office 2007 replaces .DOC format with .DOCX
I have a routine (per Enrico) to convert a .DOC file to a text file (.TXT) as follows:
-------
LOCAL oWord := CREATEOBJECT( "Word.Application" )
LOCAL oDoc := oWord:Documents:Open( "e:\xharbour\test.doc" )
oDoc:SaveAs( "e:\MyDir\NewDocument.txt", wdFormatDOSText )
oWord:Quit()
------
Works great.
I don't have Office 2007 so can anyone tell me what change I have to make to the above to programatically convert a .DOCX file to a text file (.TXT)?
TIA
Col
I have a routine (per Enrico) to convert a .DOC file to a text file (.TXT) as follows:
-------
LOCAL oWord := CREATEOBJECT( "Word.Application" )
LOCAL oDoc := oWord:Documents:Open( "e:\xharbour\test.doc" )
oDoc:SaveAs( "e:\MyDir\NewDocument.txt", wdFormatDOSText )
oWord:Quit()
------
Works great.
I don't have Office 2007 so can anyone tell me what change I have to make to the above to programatically convert a .DOCX file to a text file (.TXT)?
TIA
Col