Outlook Gurus, I have a question
#1
Outlook Gurus, I have a question
I send out an email every Monday with an attachment that I update weekly. I have figured out by now to compose a message template that contains the same recipients, subject line, and body of the message. Is there a way to have the template automatically update the attachment? Outlook help is useless.
What I want to do is update the attachment on my desktop, open the message template, and send it off.
TIA
What I want to do is update the attachment on my desktop, open the message template, and send it off.
TIA
#3
Something like this should work:
Sub Test()
Dim objMail As Outlook.MailItem
Set objMail = Application.CreateItem(olMailItem)
With objMail
.To = "Test" 'Insert a name to be sent to
.Body = "My Text" ' The mail body
.Display 'Show it
.OutlookAttach = .Attachments.Add("C:\test.txt")
End With
End Sub
Sub Test()
Dim objMail As Outlook.MailItem
Set objMail = Application.CreateItem(olMailItem)
With objMail
.To = "Test" 'Insert a name to be sent to
.Body = "My Text" ' The mail body
.Display 'Show it
.OutlookAttach = .Attachments.Add("C:\test.txt")
End With
End Sub
#5
Originally Posted by vader716
Something like this should work:
Sub Test()
Dim objMail As Outlook.MailItem
Set objMail = Application.CreateItem(olMailItem)
With objMail
.To = "Test" 'Insert a name to be sent to
.Body = "My Text" ' The mail body
.Display 'Show it
.OutlookAttach = .Attachments.Add("C:\test.txt")
End With
End Sub
Sub Test()
Dim objMail As Outlook.MailItem
Set objMail = Application.CreateItem(olMailItem)
With objMail
.To = "Test" 'Insert a name to be sent to
.Body = "My Text" ' The mail body
.Display 'Show it
.OutlookAttach = .Attachments.Add("C:\test.txt")
End With
End Sub
Thanks though!
#7
Trending Topics
#8
Originally Posted by KSUWildcat
So your saying it looks like I'm better off deleting and attaching the old fashioned way. Had I a little more time to invest in Visual Basic, this would be the answer!
Thanks though!
Thanks though!
#9
Originally Posted by KSUWildcat
So your saying it looks like I'm better off deleting and attaching the old fashioned way. Had I a little more time to invest in Visual Basic, this would be the answer!
Originally Posted by vader716
actually when you go into Outlook and macros...you should be able to code it yourself...you shouldnt need a full copy of VB
#10
#11
#12
Sub Test()
Dim objMail As Outlook.MailItem
Set objMail = Application.CreateItem(olMailItem)
With objMail
'messageclass would load a form called test
.MessageClass = ("ipm.note.test")
.To = "Test" 'Insert a name to be sent to
.Body = "My Text" & vbCr & vbCr & "Thank you," & vbCr & "Signature goes here" ' The mail body
.Attachments.Add ("C:\test.txt")
.Display 'Show it
End With
Dim objMail As Outlook.MailItem
Set objMail = Application.CreateItem(olMailItem)
With objMail
'messageclass would load a form called test
.MessageClass = ("ipm.note.test")
.To = "Test" 'Insert a name to be sent to
.Body = "My Text" & vbCr & vbCr & "Thank you," & vbCr & "Signature goes here" ' The mail body
.Attachments.Add ("C:\test.txt")
.Display 'Show it
End With
Try this
You can add a button by right clicking the toolbar, customize, macros, select the macro and drag it to the bar
Last edited by vader716; 05-15-2006 at 01:22 PM.
#14
Sub Test()
Dim objMail As Outlook.MailItem
Set objMail = Application.CreateItem(olMailItem)
With objMail
'messageclass would load a form called test
.MessageClass = ("ipm.note.test")
.To = "Test" 'Insert a name to be sent to
.Attachments.Add ("C:\test.txt")
.HTMLBody = "<html><font color = #00B2EE body text='#00B2EE'> <b>text: <font color = #b90000><i><b>" & "</b></i></font><br>Comment: <font color = #00B2EE><i><b>" & "</b></i></font> <p>Thanks </body></html>"
.Display 'Show it
End With
End Sub
Dim objMail As Outlook.MailItem
Set objMail = Application.CreateItem(olMailItem)
With objMail
'messageclass would load a form called test
.MessageClass = ("ipm.note.test")
.To = "Test" 'Insert a name to be sent to
.Attachments.Add ("C:\test.txt")
.HTMLBody = "<html><font color = #00B2EE body text='#00B2EE'> <b>text: <font color = #b90000><i><b>" & "</b></i></font><br>Comment: <font color = #00B2EE><i><b>" & "</b></i></font> <p>Thanks </body></html>"
.Display 'Show it
End With
End Sub
Last edited by vader716; 05-15-2006 at 01:37 PM.
#15