Hi all
I have a button on an excel form to create an email and attach a word document that i am using as a template, this I am ok with and have working fine
I also have a value in cell A1 say "12345" as an example
My question is, is it possible to attach my template word document but for it to be named as per the value in cell A1?
See the code below for how im getting things working so far
[VBA] Dim AppOutlook As Object
Dim StrAttach As String
StrAttach = App.Path & "/Renewal.doc"
Set AppOutlook = CreateObject("Outlook.application")
With AppOutlook.CreateItem(olMailItem)
'Send Message To
.To = ""
'Subject
.Subject = ""
'Body Text
.Body = "Due for something or overdue etc......"
'Display the message
.Display
.Attachments.Add StrAttach
End With
Set AppOutlook = Nothing[/VBA]
Cheers
Gibbo