J
John
I have a userform that inserts data into bookmarks in a word document. At
the end of the routine I insert some details into and displays the
MailEnvelope.
All all works fine on my PC, but when a collegue runs it the following error
is displayed:
Run-time '-2147467262 (80004002)':
The operation failed
This error occurs on this line: .Item.to = "(e-mail address removed)"
Here is the code for the relevant section:
Dim strSubject As String
Dim env As Office.MsoEnvelope
strSubject = "Email Subject"
Set env = ActiveDocument.MailEnvelope
With env
.Introduction = "Insert some text"
.Item.subject = strSubject
.Item.to = "(e-mail address removed)"
End With
Set env = Nothing
ActiveWindow.EnvelopeVisible = Not ActiveWindow.EnvelopeVisible
Another person gets this error:
Run-time error '-2147467259 (80004005)'
Method 'MailEnvelope' of object '_Document' failed
Which happens on this line of the above code: Set env =
ActiveDocument.MailEnvelope
Any ideas?
the end of the routine I insert some details into and displays the
MailEnvelope.
All all works fine on my PC, but when a collegue runs it the following error
is displayed:
Run-time '-2147467262 (80004002)':
The operation failed
This error occurs on this line: .Item.to = "(e-mail address removed)"
Here is the code for the relevant section:
Dim strSubject As String
Dim env As Office.MsoEnvelope
strSubject = "Email Subject"
Set env = ActiveDocument.MailEnvelope
With env
.Introduction = "Insert some text"
.Item.subject = strSubject
.Item.to = "(e-mail address removed)"
End With
Set env = Nothing
ActiveWindow.EnvelopeVisible = Not ActiveWindow.EnvelopeVisible
Another person gets this error:
Run-time error '-2147467259 (80004005)'
Method 'MailEnvelope' of object '_Document' failed
Which happens on this line of the above code: Set env =
ActiveDocument.MailEnvelope
Any ideas?