Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Boudewijn Lutgerink
  Where is Boudewijn Lutgerink?
 Hoonaardstraat, Driel
 Netherlands
 Boudewijn Lutgerink
 To: mohammed qasem
  Where is mohammed qasem?
 amman
 Jordan
 mohammed qasem
 Tags
Subject: RE: word.doc
Thread ID: 198453 Message ID: 198619 # Views: 43 # Ratings: 1
Version: Visual FoxPro 9 Category: Forms
Date: Monday, October 13, 2008 4:43:05 PM         
   


> hi all,
>
> i try to open word doc via this code , no errors , no resault,
>
> WITH thisform.combo1
> 
> thisform.text17.value=.list(.listindex,1)
> thisform.text4.value=.list(.listindex,2)
> 
> m.lcFileName=thisform.text4.value+"."+"doc"
> 
> SET DEFAULT TO c:\deal
> 
> declare long ShellExecute in "shell32.dll" ;
> 	long hwnd, string lpszOp, ;
> 	string lpszFile, string lpszParams, ;
>     string lpszDir, long nShowCmd
> 
> ShellExecute(0,'Open', m.lcFileName, 0,0,1)
> *ShellExecute(0,'Open', GETFILE(), 0,0,1)
> 
> ENDWITH
> 
> 

>
>
>
> thanks

LOCAL lcFileName, loword as word.application

lcFileName=thisform.text4.value+"."+"doc"
lcfilename = FULLPATH( CURDIR())+lcFIlename

loword = CREATEOBJECT("word.application")
loword.Documents.Open( lcFilename)
loword.Visible=.T.


Boudewijn LutgeĀ®ink
http://www.vfpdevelopers-online.com
The truth will set you free, Ken knew the truth!

COMPLETE THREAD

word.doc Posted by mohammed qasem @ 10/12/2008 12:04:49 PM
RE: word.doc Posted by tushar @ 10/12/2008 12:18:04 PM
RE: word.doc Posted by Cetin Basoz @ 10/12/2008 12:45:52 PM
RE: word.doc Posted by Boudewijn Lutgerink @ 10/13/2008 4:43:05 PM