I found the macro that takes fields from excel and sends an email.
I would like to create an email from an outlook template, populate fields from excel and save it as a draft.
Here's the outlook/VBA macro - I'd like to pull from excel the following columns:
Email Address, Meeting Date, First Names, Last Name, Next Meeting Date, Next Meeting Time and Next Meeting Location. I started to set up the macro to enter these items, however, it would be better if I could pull the info from an excel spreadsheet.
Is there a way to run the macro from outlook and pull data from an excel spreadsheet or is it better to start with a macro from excel? I don't want excel to send the email, only save the draft
Sub SummaryLetter()
Dim TemplName As String
Dim DriveLetter
Dim FolderName As String
Dim MeetingDate
Dim FirstNames As String
Dim LastName As String
Dim NextMeetingDate As String
Dim NextMeetingTime As String
DriveLetter = "C:\Users\"
UserName = Environ("Username")
FolderName = "\Box Sync\Templates\"
TemplName = "Meeting Summary.oft"
strTemplateName = DriveLetter + UserName + FolderName + TemplName
Set msg = Application.CreateItemFromTemplate(strTemplateName)
MeetingDate = InputBox("Meeting Date")
FirstNames = InputBox("First Names")
LastName = InputBox("Last Name")
NextMeetingDate = InputBox("Next Meeting Day, Date")
NextMeetingTime = InputBox("time")
msg.Display
End Sub
I'm not a programmer, an end user, trying to automate things to save time. Thanks~
I would like to create an email from an outlook template, populate fields from excel and save it as a draft.
Here's the outlook/VBA macro - I'd like to pull from excel the following columns:
Email Address, Meeting Date, First Names, Last Name, Next Meeting Date, Next Meeting Time and Next Meeting Location. I started to set up the macro to enter these items, however, it would be better if I could pull the info from an excel spreadsheet.
Is there a way to run the macro from outlook and pull data from an excel spreadsheet or is it better to start with a macro from excel? I don't want excel to send the email, only save the draft
Sub SummaryLetter()
Dim TemplName As String
Dim DriveLetter
Dim FolderName As String
Dim MeetingDate
Dim FirstNames As String
Dim LastName As String
Dim NextMeetingDate As String
Dim NextMeetingTime As String
DriveLetter = "C:\Users\"
UserName = Environ("Username")
FolderName = "\Box Sync\Templates\"
TemplName = "Meeting Summary.oft"
strTemplateName = DriveLetter + UserName + FolderName + TemplName
Set msg = Application.CreateItemFromTemplate(strTemplateName)
MeetingDate = InputBox("Meeting Date")
FirstNames = InputBox("First Names")
LastName = InputBox("Last Name")
NextMeetingDate = InputBox("Next Meeting Day, Date")
NextMeetingTime = InputBox("time")
msg.Display
End Sub
I'm not a programmer, an end user, trying to automate things to save time. Thanks~