Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Gaetan Doger de Speville
  Where is Gaetan Doger de Speville?
 Curepipe
 Mauritius
 Gaetan Doger de Speville
 To: Vijayendran
  Where is Vijayendran?
 Chennai
 India
 Vijayendran
 Tags
Subject: RE: Call word from vfp form
Thread ID: 22564 Message ID: 22770 # Views: 18 # Ratings: 0
Version: Visual FoxPro 5 Category: General VFP Topics
Date: Friday, April 25, 2003 9:04:15 AM         
   


Hi,

I have used the following code to launch word and open a specific file:

	LOCAL oWord,  sDocSrc

	sDocSrc = "QWord.doc"	&& Set the filename

	oWord = CREATEOBJECT( "Word.Application" )
	IF nErrHdlr > 0		&& I have an error handler that sets the global vaiable nErrHdlr
		RELEASE oWord
		RETURN
	ENDIF
	oWord.Visible = .T.
	oWord.Documents.Open( sDocSrc, 0, 1 )
	IF nErrHdlr > 0
		RELEASE oWord
		RETURN
	ENDIF
	RELEASE oWord
	RETURN


I believe that this should do the trick. It worked on VFP6 and VFP7.

Regards

Gaetan

>
> Onclick of key F1 , the word file has to be displayed from a form in vfp. How can this be done? Can anybody help.
>
> Regards
> Vijayendran S



COMPLETE THREAD

Call word from vfp form Posted by Vijayendran @ 4/22/2003 1:16:43 PM
RE: Call word from vfp form Posted by Boudewijn Lutgerink @ 4/22/2003 2:07:43 PM
RE: Call word from vfp form Posted by Gaetan Doger de Speville @ 4/25/2003 9:04:15 AM