DH
Programmer
- Dec 8, 2000
- 168
I can use the following code to create an email message in Outlook 2000 and attach a file. However, the file attaches at the beginning (top left corner) of the email. Any suggestions on how to get the attachment to attach at the end of the email.
Private Sub Command0_Click()
Dim stpath As String
Dim appoutlook As Outlook.Application
Dim mailoutlook As Outlook.MailItem
Set appoutlook = CreateObject("outlook.application"
Set mailoutlook = appoutlook.CreateItem(olMailItem)
stpath = "C:\Documents and Settings\Owner\Desktop\abc.pdf"
With mailoutlook
.To = "email@emailaddress.com"
.Subject = "Test"
.Body = "Test Attachment"
.Attachments.Add stpath
.Display
End With
End Sub
.Display lets you preview the email message before its sent. When previewing the email I can goto Format on the toolbar and change the Format to "Plain Text" which then causes the email to attach in a new window pane a the bottom of the email. Is it possible to do this from code?
Thanks
DH
Private Sub Command0_Click()
Dim stpath As String
Dim appoutlook As Outlook.Application
Dim mailoutlook As Outlook.MailItem
Set appoutlook = CreateObject("outlook.application"

Set mailoutlook = appoutlook.CreateItem(olMailItem)
stpath = "C:\Documents and Settings\Owner\Desktop\abc.pdf"
With mailoutlook
.To = "email@emailaddress.com"
.Subject = "Test"
.Body = "Test Attachment"
.Attachments.Add stpath
.Display
End With
End Sub
.Display lets you preview the email message before its sent. When previewing the email I can goto Format on the toolbar and change the Format to "Plain Text" which then causes the email to attach in a new window pane a the bottom of the email. Is it possible to do this from code?
Thanks
DH