Nov 7, 2007 #1 bpratl Programmer Jul 7, 2002 25 US How would I go about running MS Publisher from a VFP application? I can run EXCEL and WORD without any problems but Publisher won't work for me.
How would I go about running MS Publisher from a VFP application? I can run EXCEL and WORD without any problems but Publisher won't work for me.
Nov 7, 2007 1 #2 Mike Lewis Programmer Jan 10, 2003 17,516 Scotland If you just want to launch Publisher as a separate program, the easiest way is to use ShellExecute(). See "Introducing ShellExecute()" at http://www.ml-consult.co.uk/foxst-26.htm for an example. Mike __________________________________ Mike Lewis (Edinburgh, Scotland) My Visual FoxPro site: www.ml-consult.co.uk Upvote 0 Downvote
If you just want to launch Publisher as a separate program, the easiest way is to use ShellExecute(). See "Introducing ShellExecute()" at http://www.ml-consult.co.uk/foxst-26.htm for an example. Mike __________________________________ Mike Lewis (Edinburgh, Scotland) My Visual FoxPro site: www.ml-consult.co.uk
Nov 7, 2007 #3 TamarGranor Programmer Jan 26, 2005 2,483 US It appears that recent versions of Publisher are automation servers, so you should be able to instantiate it just as you do Excel or Word. Looks like: oPub = CREATEOBJECT("Publisher.Application") does the trick. Of course, the hard part is figuring out how to use the thing, but IntelliSense and the Object Browser should help you. Tamar Upvote 0 Downvote
It appears that recent versions of Publisher are automation servers, so you should be able to instantiate it just as you do Excel or Word. Looks like: oPub = CREATEOBJECT("Publisher.Application") does the trick. Of course, the hard part is figuring out how to use the thing, but IntelliSense and the Object Browser should help you. Tamar
Nov 7, 2007 Thread starter #4 bpratl Programmer Jul 7, 2002 25 US Unfortunately they are using Publisher 98 so Tamar's suggestion of Code: oPub = CREATEOBJECT("Publisher.Application") Did not work. I have not tried it with a later version. Mike Lewis ShellExecute() API works great and solved the problem. Thanks for quick response. Upvote 0 Downvote
Unfortunately they are using Publisher 98 so Tamar's suggestion of Code: oPub = CREATEOBJECT("Publisher.Application") Did not work. I have not tried it with a later version. Mike Lewis ShellExecute() API works great and solved the problem. Thanks for quick response.