Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Word Documents and Editing

Status
Not open for further replies.

bebbo

Programmer
Dec 5, 2000
621
GB
I wish to add word documents to my screen. This word document will be already created ie c:\test.doc etc.. I know how to add a word document but I would like to know how to show a specific document ie c:\test.doc or whatever it is called. This document will also need to be edited and alterations saved. How do I do this?
 
Presuming you have Word installed and it's associated with .DOC files, try:

declare INTEGER ShellExecute in shell32 INTEGER handle, STRING @ oper, STRING @ ifile, STRING @ iparam, STRING @ ipath, INTEGER showcmd

=shellexecute(0,"open",filename,"",startupdirectory,1)

where:

filename = the full name and path of the file eg. c:\document1.doc
and startupdirectory is the start in directory you get with shortcuts eg. c:

Rick
 
Try this
oword=crea('word.basic')
oword.fileopen("c:\newdoc.doc")
oword.appshow()
Make your edits and click outside of word to return to vfp
oword.filesave()
oword.fileexit() to close
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top