Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connect to the right Word instance with CREATEOBJECT()
Message
De
08/05/1998 05:06:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00097971
Message ID:
00097978
Vues:
35
>Hi everyone,
>
>in the example below I open an embedded Word document in a Word window and then set the pagesize of it.
>
>THISFORM.Ole1.Refresh()
>THISFORM.Ole1.DoVerb(-2)
>
>oWord = GETOBJECT(,"Word.Application.8")
>WITH oWord.ActiveDocument.PageSetup
> .PageWidth = oWord.CentimetersToPoints(21)
> .PageHeight = oWord.CentimetersToPoints(29.7)
>ENDWITH
>
>How can know if the right Word instance is opened, if the user has a number of the running?
>
>Is there a better way to get hold of the instance of Word the OLE object is opened in??
Klas,
Since you have an Ole control on form you already have access to it. Do not use getobject, instead of oWord, use thisform.ole1.object.
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