Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.doc to .txt
Message
De
11/03/2010 04:21:42
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01453860
Message ID:
01453868
Vues:
105
This message has been marked as the solution to the initial question of the thread.
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform