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.
I have an email that I send often, just with some variable information. I would like to have a macro that creates the base information, then leaves the email open for me to change the variable parts. I tried using the basic vba formats then commenting out the .SEND to hopefully leave the email unsent - No Luck. Any ideas how I can leave it partly filled in, but unsent ?
Thanks. The code I used is shown below.
Bob
Code:
Sub Badge()
Set OutProg = CreateObject("outlook.application")
Set OutM = OutProg.CreateItem(OlItemType.olMailItem)
With OutM
.Subject = "Just testing."
.To = "johndoe@yahoo.com"
.Body = "Here we go"
Rem .Send
End With
End Sub
Last edited by rfhall50; 06-16-2009 at 01:07 PM.
Reason: DonkeyOte is the best !
I answered prematurely before I automatically thought it was XL related question so apologies... below would be an OL macro:
Code:
Sub Badge()
Dim OLi As MailItem
Set OLi = Application.CreateItem(olMailItem)
With OLi
.To = "johndoe@yahoo.com"
.Subject = "Just testing"
.Body = "Here we go"
.Display
End With
Set OLi = Nothing
End Sub
I've undeleted my prior post on the off chance you were talking from XL...
Thank you so much. As you were sending your second response, I was tucking away that hyperlink idea for a future challenge. Your second idea was EXACTLY what I was looking for.
in oulook you can just do a mail as you like then save it as a .oft
file/save as .oft
(if outlook template is not in the menu, its because you are using word as text editor,turn it of create template save somewhere turn back on word as editor)
then you can assign template to a button on toolbar.