Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I add attachments to an open Outlook email without sending?

Status
Not open for further replies.

Puebles

Programmer
Feb 3, 2016
14
US
I have reviewed and tested many examples of adding attachments like the following:

#DEFINE MAILITEM 0
#DEFINE IMPORTANCELOW 0
#DEFINE IMPORTANCENORMAL 1
#DEFINE IMPORTANCEHIGH 2

oOutLookObject = CreateObject("Outlook.Application")
oEmailItem = oOutLookObject.CreateItem(MAILITEM)

WITH oEmailItem
.Recipients.Add("moe@3stooges.com") && uses the Recipients collection
.Subject = "Automation sample"
.Importance = IMPORTANCENORMAL
.Body = "This is easy!"
.Attachments.Add("Z:\Reference\VR Guidance\DATA\Other Opinions\GO0012.pdf")
.Send
ENDWITH

RELEASE oEmailItem
RELEASE oOutLookObject

This is simple and works. I would like to give credit but it was dozens of examples ago.

The problem is I have a knowledge and application database with thousands of attachments to view. I would like to be able to add attachments to an email (Outlook) without filling any other fields or sending. When I remove the ".Send" command I get no response.

I need to pick and choose which attachments. Example: A customer calls with a fraud issue. I want to add the following attachments:
Birth Record Form.pdf​
Identity Theft Brochure.pdf​
Customer Flag Request.doc​

I will then fill in the email address, subject, etc.

 
Hi,

This does not sound like a FoxPro Application question, as much as an Outlook Application question, which would be better addressed in either Forum68 or Forum707.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Yes. Thank you. This saves a draft with the attachment. I can work with this and add multiple using other functions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top