G
goshute
I am trying to email a word doucument from Excel. I have some data in
Excel that I am inserting into a new Word document that I create from a
template. Then I want to send that Word document as the BODY of an
email which I can do manually by selecting File > Send To > Mail
Recipient. In VBA, I can open the "EnvelopeWindow" but can not enter
any info into the TO or Subject lines. I receive the following error.
Run-time error '-2147417851 (80010105) Automation error The server
threw an exception
I also get this error when I try to save the Word document with SaveAs.
I am not stuck on any one process but I would like to be able to send
these messages automatically.
As there are over 300 of these messages that need to be sent each
month, I would like to eliminate this manual step.
My code snippet:
WDApp.ActiveWindow.EnvelopeVisible = True
With WDApp.ActiveDocument.MailEnvelope
.Item.To = "(e-mail address removed)"
.Item.Subject = "SOX Review"
End With
Excel that I am inserting into a new Word document that I create from a
template. Then I want to send that Word document as the BODY of an
email which I can do manually by selecting File > Send To > Mail
Recipient. In VBA, I can open the "EnvelopeWindow" but can not enter
any info into the TO or Subject lines. I receive the following error.
Run-time error '-2147417851 (80010105) Automation error The server
threw an exception
I also get this error when I try to save the Word document with SaveAs.
I am not stuck on any one process but I would like to be able to send
these messages automatically.
As there are over 300 of these messages that need to be sent each
month, I would like to eliminate this manual step.
My code snippet:
WDApp.ActiveWindow.EnvelopeVisible = True
With WDApp.ActiveDocument.MailEnvelope
.Item.To = "(e-mail address removed)"
.Item.Subject = "SOX Review"
End With