Set itm = doc.MailEnvelope.Item

  • Thread starter Thread starter Marlene.Sawhney
  • Start date Start date
M

Marlene.Sawhney

Hello Everyone,

I'm getting a runtime error that says: Run-Time error '-2147467259.
Method 'Mailenveloe' of object_document failed

I have read every posting about this and still can't seem to figure it
out. Whats wierd is that i've been using this macro for months and
all of a sudden this week it doesn't work! Any ideas on whats wrong?
The following is the code I'm using. Any help would be great as this
macro sends out about 100 emails. Also, outlook is my default
program.

Set itm = doc.MailEnvelope.Item
doc.MailEnvelope.Introduction = ActiveCell.Offset(0, 4).Value

THANKS!
 
I haven't seen an instance of that failing. Can the user send a document manually with the File | Send To command?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Yea, I can send the document as per normal. The helpdesk upgraded
office but they don't really know what the update was. Is there an
object I am missing? I'm assuming thats what it is.

Also, there was a typo in my previous email. The error was:

Run-Time error '-2147467259.
Thanks!!
 
I don't think there's anything missing, but good debugging would suggest expanding the code to get each object separately:

Set env = doc.MailEnvelope
Set itm = env.Item
strCell = ActiveCell.Offset(0, 4).Value
env.Introduction = strCell

but I suspect that will make no difference. Running Help | Detect and Repair is also a good move.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top