![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I have noticed that the name of the attachment gets added into the body of the email, eventhough not specified in the body of the email when composing and sending an email using MSOutlook programmatically. The email received in InBox, - Has the actual attachment on top of the email as expected. - Body gets the name of the attachment, eventhough the detail added to the mail was only "This is a test email." as follows, "T 07.04.02 - PlanningPermit.pdf his is a test email." "07.04.02 - PlanningPermit.pdf" is the name of the attachment - This happens with MS OutLook 2003 SP3 - This program works fine with MSO 2003 SP2 on another computer. Please could someone advice on how to get rid of the attachment name getting added to the body of the email enclosed with and . |
Ads |
#2
|
|||
|
|||
![]()
Please show the code you're using to create the message.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "DPM" wrote: Hi, I have noticed that the name of the attachment gets added into the body of the email, eventhough not specified in the body of the email when composing and sending an email using MSOutlook programmatically. The email received in InBox, - Has the actual attachment on top of the email as expected. - Body gets the name of the attachment, eventhough the detail added to the mail was only "This is a test email." as follows, "T 07.04.02 - PlanningPermit.pdf his is a test email." "07.04.02 - PlanningPermit.pdf" is the name of the attachment - This happens with MS OutLook 2003 SP3 - This program works fine with MSO 2003 SP2 on another computer. Please could someone advice on how to get rid of the attachment name getting added to the body of the email enclosed with and . |
#3
|
|||
|
|||
![]()
Hi Sue,
loOutLookSession = CREATEOBJECT('OutLook.Application') loOutBox = loOutLookSession.GetNameSpace("MAPI").GetDefaultFo lder(4) loMailItem = loOutBox.Items.Add(0) loMailItem.Subject = "This is the Subject" loMailItem.BodyFormat = 1 loMailItem.Body = "This is the Detail" loMailItem.TO = To recipient lcAttachment = Name of the attachment lnAttachmentPosition = loMailItem.Attachments.Count + 1 loMailItem.Attachments.Add(lcAttachment, 1, lnAttachmentPosition, Display name of the attachment) loMailItem.Send() "Sue Mosher [MVP-Outlook]" wrote in message ... Please show the code you're using to create the message. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "DPM" wrote: Hi, I have noticed that the name of the attachment gets added into the body of the email, eventhough not specified in the body of the email when composing and sending an email using MSOutlook programmatically. The email received in InBox, - Has the actual attachment on top of the email as expected. - Body gets the name of the attachment, eventhough the detail added to the mail was only "This is a test email." as follows, "T 07.04.02 - PlanningPermit.pdf his is a test email." "07.04.02 - PlanningPermit.pdf" is the name of the attachment - This happens with MS OutLook 2003 SP3 - This program works fine with MSO 2003 SP2 on another computer. Please could someone advice on how to get rid of the attachment name getting added to the body of the email enclosed with and . |
#4
|
|||
|
|||
![]()
Try changing your Attachments.Add statement to:
loMailItem.Attachments.Add(lcAttachment, 1) Neither the position nor the display name parameters are relevant to a plain text message with the file attached by value. You might also try setting Body after you attach the file. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "DPM" wrote: Hi Sue, loOutLookSession = CREATEOBJECT('OutLook.Application') loOutBox = loOutLookSession.GetNameSpace("MAPI").GetDefaultFo lder(4) loMailItem = loOutBox.Items.Add(0) loMailItem.Subject = "This is the Subject" loMailItem.BodyFormat = 1 loMailItem.Body = "This is the Detail" loMailItem.TO = To recipient lcAttachment = Name of the attachment lnAttachmentPosition = loMailItem.Attachments.Count + 1 loMailItem.Attachments.Add(lcAttachment, 1, lnAttachmentPosition, Display name of the attachment) loMailItem.Send() "Sue Mosher [MVP-Outlook]" wrote in message ... Please show the code you're using to create the message. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "DPM" wrote: Hi, I have noticed that the name of the attachment gets added into the body of the email, eventhough not specified in the body of the email when composing and sending an email using MSOutlook programmatically. The email received in InBox, - Has the actual attachment on top of the email as expected. - Body gets the name of the attachment, eventhough the detail added to the mail was only "This is a test email." as follows, "T 07.04.02 - PlanningPermit.pdf his is a test email." "07.04.02 - PlanningPermit.pdf" is the name of the attachment - This happens with MS OutLook 2003 SP3 - This program works fine with MSO 2003 SP2 on another computer. Please could someone advice on how to get rid of the attachment name getting added to the body of the email enclosed with and . |
#5
|
|||
|
|||
![]()
Hi Sue,
Thanks, I'll try to see if it works. "Sue Mosher [MVP-Outlook]" wrote in message ... Try changing your Attachments.Add statement to: loMailItem.Attachments.Add(lcAttachment, 1) Neither the position nor the display name parameters are relevant to a plain text message with the file attached by value. You might also try setting Body after you attach the file. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "DPM" wrote: Hi Sue, loOutLookSession = CREATEOBJECT('OutLook.Application') loOutBox = loOutLookSession.GetNameSpace("MAPI").GetDefaultFo lder(4) loMailItem = loOutBox.Items.Add(0) loMailItem.Subject = "This is the Subject" loMailItem.BodyFormat = 1 loMailItem.Body = "This is the Detail" loMailItem.TO = To recipient lcAttachment = Name of the attachment lnAttachmentPosition = loMailItem.Attachments.Count + 1 loMailItem.Attachments.Add(lcAttachment, 1, lnAttachmentPosition, Display name of the attachment) loMailItem.Send() "Sue Mosher [MVP-Outlook]" wrote in message ... Please show the code you're using to create the message. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "DPM" wrote: Hi, I have noticed that the name of the attachment gets added into the body of the email, eventhough not specified in the body of the email when composing and sending an email using MSOutlook programmatically. The email received in InBox, - Has the actual attachment on top of the email as expected. - Body gets the name of the attachment, eventhough the detail added to the mail was only "This is a test email." as follows, "T 07.04.02 - PlanningPermit.pdf his is a test email." "07.04.02 - PlanningPermit.pdf" is the name of the attachment - This happens with MS OutLook 2003 SP3 - This program works fine with MSO 2003 SP2 on another computer. Please could someone advice on how to get rid of the attachment name getting added to the body of the email enclosed with and . |
#6
|
|||
|
|||
![]()
Hi Sue,
Thanks it works. For this we did not set the index possition of the attachments when the mail is sent in plain text. "DPM" wrote in message ... Hi Sue, Thanks, I'll try to see if it works. "Sue Mosher [MVP-Outlook]" wrote in message ... Try changing your Attachments.Add statement to: loMailItem.Attachments.Add(lcAttachment, 1) Neither the position nor the display name parameters are relevant to a plain text message with the file attached by value. You might also try setting Body after you attach the file. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "DPM" wrote: Hi Sue, loOutLookSession = CREATEOBJECT('OutLook.Application') loOutBox = loOutLookSession.GetNameSpace("MAPI").GetDefaultFo lder(4) loMailItem = loOutBox.Items.Add(0) loMailItem.Subject = "This is the Subject" loMailItem.BodyFormat = 1 loMailItem.Body = "This is the Detail" loMailItem.TO = To recipient lcAttachment = Name of the attachment lnAttachmentPosition = loMailItem.Attachments.Count + 1 loMailItem.Attachments.Add(lcAttachment, 1, lnAttachmentPosition, Display name of the attachment) loMailItem.Send() "Sue Mosher [MVP-Outlook]" wrote in message ... Please show the code you're using to create the message. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "DPM" wrote: Hi, I have noticed that the name of the attachment gets added into the body of the email, eventhough not specified in the body of the email when composing and sending an email using MSOutlook programmatically. The email received in InBox, - Has the actual attachment on top of the email as expected. - Body gets the name of the attachment, eventhough the detail added to the mail was only "This is a test email." as follows, "T 07.04.02 - PlanningPermit.pdf his is a test email." "07.04.02 - PlanningPermit.pdf" is the name of the attachment - This happens with MS OutLook 2003 SP3 - This program works fine with MSO 2003 SP2 on another computer. Please could someone advice on how to get rid of the attachment name getting added to the body of the email enclosed with and . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Name of the attachment gets added automatically to the body of the email | DPM | Outlook and VBA | 0 | July 8th 08 11:54 AM |
automatically check if attachment was added when sending message | kkappabear | Outlook and VBA | 3 | August 6th 07 01:18 PM |
Create email with body and doc attachment | ms | Outlook and VBA | 1 | January 18th 07 05:56 AM |
How do I stop email contacts from being added automatically? | NoCorners Bob | Outlook - Using Contacts | 4 | November 2nd 06 04:25 AM |
email addresses automatically added to contacts folder | Gumbysgirl4 | Outlook - Using Contacts | 1 | March 13th 06 11:02 PM |