G
Guest
I have created a command button "submit" on a word document and have tried to
create a macro to email it, however i have done something wrong as the
attachment is not being created. Could someone please help me ASAP!
Sub CommandButton1_Click()
Dim Email As Object
Dim Attachment As String
Set Email = CreateObject("Outlook.Application") 'Assign Outlook application
to variable
With Email.CreateItem(olMailItem)
.to = "<>" 'email address
.Subject = "Incident Report" 'Something for the subject Field
.body = ActiveDocument
.Display = Attachment
Options.SendMailAttach = True
End With
create a macro to email it, however i have done something wrong as the
attachment is not being created. Could someone please help me ASAP!
Sub CommandButton1_Click()
Dim Email As Object
Dim Attachment As String
Set Email = CreateObject("Outlook.Application") 'Assign Outlook application
to variable
With Email.CreateItem(olMailItem)
.to = "<>" 'email address
.Subject = "Incident Report" 'Something for the subject Field
.body = ActiveDocument
.Display = Attachment
Options.SendMailAttach = True
End With