Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Hans de Groot
  Where is Hans de Groot?
 Den Haag
 Netherlands
 Hans de Groot
 To: Barbara Peisch
  Where is Barbara Peisch?
 Oceanside
 California - United States
 Barbara Peisch
Subject: RE: Getobject / Createobject
Thread ID: 183878 Message ID: 183940 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Wednesday, July 16, 2008 6:59:00 AM         
   



Hi Barbara,

Your solution is spot on, but I misinformed you.
The Outlook automation is used to create a mailmerge letter. Then MS Word is made visible and it's up to the user to merge/print the document.
The 'normal.dot in use' message appears when the user closes this instance of Word while there is another instance open.
As a workaround, I ask users not to have Word open when they do the mail merge, but it also happens when they have a new mail message window open in MS Outlook and Word is used as the email editor. It's hard to explain that to them ;-)

Hans

>
What I would do is use GETOBJECT() just to determine if there's a Word instance open, but then use CREATEOBJECT() to get your own instance. Only close Word completely if there wasn't an instance open to start with. (You might want to check if that instance is still around at the end of your process.)

ENTIRE THREAD

Getobject / Createobject Posted by Hans de Groot @ 7/15/2008 5:53:45 PM
RE: Getobject / Createobject Posted by Barbara Peisch @ 7/15/2008 8:41:43 PM
RE: Getobject / Createobject Posted by Yousfi Benameur @ 7/16/2008 3:17:15 AM
RE: Getobject / Createobject Posted by Barbara Peisch @ 7/16/2008 4:47:46 AM
RE: Getobject / Createobject Posted by Yousfi Benameur @ 7/16/2008 8:06:03 PM
RE: Getobject / Createobject Posted by Barbara Peisch @ 7/16/2008 9:44:03 PM
RE: Getobject / Createobject Posted by Hans de Groot @ 7/16/2008 6:59:00 AM
RE: Getobject / Createobject Posted by Yousfi Benameur @ 7/16/2008 8:26:48 AM
RE: Getobject / Createobject Posted by Christof Wollenhaupt @ 7/16/2008 10:51:35 AM
RE: Getobject / Createobject Posted by Koen Piller @ 7/17/2008 9:34:02 AM
RE: Getobject / Createobject Posted by Hans de Groot @ 8/8/2008 10:49:34 AM
RE: Getobject / Createobject Posted by Yousfi Benameur @ 8/8/2008 11:38:08 AM