Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dde with word 6.0
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00121936
Message ID:
00121958
Vues:
17
>This works fine in FoxPro 2.6, but with Visual 5.0, instead of opening the document and running a macro, it loads Word, and opens Document1 and stops as if there is no more code.
>
>
>
>=ddesetoption('SAFETY', .F.)
>ichannel = DDEINITIATE("WinWord", "System")
>	IF ichannel=-1
>		RUN /N c:\winword\winword.exe
>		ichannel = DDEINITIATE("WinWord", "System")
>		ask=.F.
>	ENDIF
>		= DDEEXECUTE(ichannel, "[AppMaximize 1 ]")
>		= DDEEXECUTE(ichannel, '[FileOpen "g:\fox\thedoc.doc", .readonly=1]')
>		= DDEEXECUTE(ichannel, "[MailMergeToDoc]")
>		= DDEEXECUTE(ichannel, '[ToolsMacro .Name="tradedegree", .run]')
>
I once heard OLE described as DDE that works. Try using OLE now called COM to do this. I have some samples on my web page from the fox team. My web URL should appear at the bottom of this message.
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform