I know that in excel I can use this command to email the current workbook as an attachment:
Application.Dialogs(xlDialogSendMail).Show
Is there an equivalent for a Word macro?
Thanks in advance,
Damian
I know that in excel I can use this command to email the current workbook as an attachment:
Application.Dialogs(xlDialogSendMail).Show
Is there an equivalent for a Word macro?
Thanks in advance,
Damian
Hi Damian,
The equivalent is Activedocument.sendmail , But it does not take arguments as in XL.
Another alternative would be to use the routing slip.
Sub Macro1()
ActiveDocument.HasRoutingSlip = True
With ActiveDocument.RoutingSlip
.Subject = "Subject"
.AddRecipient "[email protected]"
.Delivery = wdAllAtOnce
End With
ActiveDocument.Route
End Sub
Although this has restrictions, like you can not change the default body text.
The other alternative is to control the mail client via code.
Cheers
Andy
Don’t have an account yet? Register yourself now and be a part of our community!