Do you want to simply open a blank document and hand it over to the user to enter the text, save the document, etc? If so, you can do that very easily with ShellExecute(). That function is well-documented, and you should have no problem finding information about it.
Or do you want to open the document, and then have your application fill it with data, save it, etc? For that, you will need to use Automation. You will need to call the Add method of either the Documents or Workbooks collections (for Word and Excel respectively).
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
If you want to do this in automation, you are going to need a copy of office installed on each PC your application is to run on.
Now this means 'installed', not running something like office 365 remotely - as far as I am aware there is no easy/quick/efficient way to automate office 365 from within VFP.
What you could do is use VFP to copy a blank (or part completed) Word or Excel file to an appropriate location and then launch a third party viewer or even editor - but automation would be most likely be quite different to MS Excel and Word...
Regards
Griff
Keep [Smile]ing
There are 10 kinds of people in the world, those who understand binary and those who don't.
I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
It also sounds like you rather want to create a new Word document or Excel Workbook. This can be as simple as having an empty file as "template" you simply copy or by using OLE automation and creating a new document or workbook.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.