Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yuri Rubinov
  Where is Yuri Rubinov?
 Pennsylvania - United States
 Yuri Rubinov
 To: Darren Larner
  Where is Darren Larner?
 United Kingdom
 Darren Larner
Subject: RE: Outlook Automation
Thread ID: 104101 Message ID: 104107 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Microsoft Office Automation
Date: Friday, August 11, 2006 3:08:07 PM         

> I want to copy the contents of a word document with all it's formatting, images etc. into the body of an outlook email. If I do this manually (Ctrl+C in Word and Ctrl+V in Outlook Body) this works fine. When I come to do this programatically, there is no paste method in outlook. I can issue oWord.Copy() and this copies the contents to the clipboard fine with all the formatting. How do I programatically copy this exactly into my outlook body?
> Thanks

I am afraid you will not find a satisfactory solution here. There are several things you need to consider.
1. Outlook message should be in the RichText format. If it is in the Plain text format, then the text formatting will be lost.
2. The cursor should be deliberately set in the message body area; only after that the paste command will work.
3. And there is no paste automation command as far as I know for at least for OL versions 2002 and prior.

All of the above may depend on the OL version, ansd on the default OL setting on the particular PC.

You may try the example that utilized sendkey command,"Outlook Automation - Sending Word Document", at www.universalthread.com, Thread 799354, Message 799487.

Best Wishes,

Yuri Rubinov


Outlook Automation Posted by Batfink91 Batfink @ 8/11/2006 1:49:17 PM
RE: Outlook Automation Posted by Mike Gagnon @ 8/11/2006 2:26:15 PM
RE: Outlook Automation Posted by Yuri Rubinov @ 8/11/2006 3:08:07 PM