amazing! it's fun just to watch this work - i lost track of why i needed it :)
thanks so much Cetin for taking the time to create this - very clever code.
k
>>I would like to convert .doc into plain text - i have opened the doc - how can i transfer the text to my m.txt file? Perhaps there is a more direct route than the one i have started.
>>
>>many thanks
>>k
>>
>>
>>objWord = CreateObject("Word.Application")
>>objWord.Documents.Open ("C:\mydirectory\mydata.doc")
>>objWord.visible = .F.
>>
>>??? move text to m.txt
>>
>>modify file m.txt
>>
>
>
>#DEFINE wdAlertsNone 0
>#DEFINE wdDoNotSaveChanges 0
>#DEFINE wdSaveChanges -1
>#DEFINE wdPromptToSaveChanges -2
>#DEFINE wdFormatText 2
>#DEFINE wdFormatTextLineBreaks 3
>
>lcDoc = "C:\mydirectory\mydata.doc"
>lcSaveAs = "C:\mydirectory\mydata.txt"
>
>oword = CREATEOBJECT('Word.Application')
>oWord.Documents.Open(m.lcDoc)
>oWord.DisplayAlerts = wdAlertsNone
>oWord.Activedocument.Saveas(m.lcSaveas, wdFormatText)
>oWord.Quit(wdSaveChanges)
Cetin