Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get A Reference to an existing open Word document
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01048097
Message ID:
01048127
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
Something like this:
oWord=GETOBJECT(,"Word.Application")
FOR ia=1 TO oWord.documents.Count
	IF LOWER(oWord.documents(ia).name)="web_vfp1.doc"
		oDOc=oWord.documents(ia)
		exit
	ENDIF
ENDFOR

IF TYPE("oDOc")#"O" or ISNULL(oDoc)
	oWord=null
	RETURN
ELSE
	*continue with oDoc
	?oDOc.name
endif
....
>Hello everyone,
>
>What is the best way to get a reference to an existing, open word document from VFP?
>
>Thank you,
>
>Angie.
Previous
Reply
Map
View

Click here to load this message in the networking platform