Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connect to the right Word instance with CREATEOBJECT()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Connect to the right Word instance with CREATEOBJECT()
Miscellaneous
Thread ID:
00097971
Message ID:
00097971
Views:
57
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??
(using VFP 3.0 for Win & Mac)
Next
Reply
Map
View

Click here to load this message in the networking platform