Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 To: Manish Shah
  Where is Manish Shah?
 Calcutta
 India
 Manish Shah
 Tags
Subject: RE: Attaching a file to Microsoft Outlook
Thread ID: 78463 Message ID: 78483 # Views: 4 # Ratings: 0
Version: Visual FoxPro 7 Category: Microsoft Office Automation
Date: Tuesday, October 04, 2005 11:41:42 AM         
   


It depends what code you are using.

#DEFINE MAILITEM 0
oOutLookObject = CreateObject('Outlook.Application')
oEmailItem = oOutLookObject.CreateItem(MAILITEM)

WITH oEmailItem
   .Subject = 'Automation sample'
   .Importance = IMPORTANCENORMAL
   .Body = 'This is easy!'
   .Attachments.Add('c:\mydir\sample.txt') && Note that the fully qualified path and file is required.
   .Display
ENDWITH

RELEASE oEmailItem
RELEASE oOutLookObject



> Visual Foxpro 7.0
> In my application I need to attach a file with Microsoft Outlook. When microsoft outlook opens, the file must be automatically attached.
> The user then selects the various email IDS from the address book and sends the mail.
> My main problem is that I cannot get Microsoft Outlook to open with attachment.
> I thank you in anticpation.
> Manish


ENTIRE THREAD

Attaching a file to Microsoft Outlook Posted by Manish Shah @ 10/4/2005 6:20:49 AM
RE: Attaching a file to Microsoft Outlook Posted by Mike Gagnon @ 10/4/2005 11:41:42 AM