Article ID: 172719
Article Last Modified on 2/12/2007
ItemToSend.Attachments.Add Application.ActiveInspector.CurrentItem, 4instead of
ItemToSend.Attachments.Add Item, 4your e-mail message will include the attachment icon.
Sub CommandButton1_Click() ' Saves the current mailitem in the Inbox Item.Save ' Create a new mail message Set ItemToSend = Application.CreateItem(0) ' Change below to your emailname to send message ItemToSend.To = "Enter your e-mail name here!" ItemToSend.Subject = "test" ' The following line results in a blank icon for attachment. ' 4 is the olAttachmentType constant olByValue to create a link. ItemToSend.Attachments.Add Item, 4 ' The following syntax will preserve the icon in the sent message ' if it's substituted for the line above. 'ItemToSend.Attachments.Add Application.ActiveInspector.CurrentItem, 4 ItemToSend.Send End Sub
166368 OL97: How to Get Help Programming with Outlook
170783 OL97: Q&A: Questions About Customizing or Programming Outlook
Additional query words: OutSol OutSol97
Keywords: kbdswnet2003swept kbcode kbprb kbprogramming KB172719