MailEnvelope not working in Excel 2007

L

lowspark

Here is a simplified version of an email macro which works in 2003 but
not in 2007.

Sub SendEmail()

Sheets("Email").Select
Range("A1:L32").Select

ActiveWorkbook.EnvelopeVisible = True
With Application.ActiveSheet.MailEnvelope
With .Item
.Recipients.Add "(e-mail address removed)"
.DeleteAfterSubmit = True
.Send
End With
End With
End Sub

If I set my internet options - Programs - Email to Microsoft Office
Outlook, it fails on this line:
ActiveWorkbook.EnvelopeVisible = True
with this error:
Run-time error '1004': Method 'EnvelopeVisible' of object '_Workbook'
failed

If I set my internet options - Programs - Email to Outlook Express, it
fails on this line:
With Application.ActiveSheet.MailEnvelope
with this error:
Run-time error '430': Class does not support Automation or does not
support expected interface

I have Excel 2007 installed and Outlook 2003 (not 2007) -- not sure if
that makes a difference.

I have scoured the web but cannot find any documentation of others
with this exact problem.

Any help or ideas will be greatly appreciated! thanks!!
 
S

Sue Mosher [MVP]

I have Excel 2007 installed and Outlook 2003 (not 2007) -- not sure if
that makes a difference.

Yes, it makes a difference. That feature requires matching versions of Excel
and Outlook. It doesn't work with Outlook Express at all.
 
L

lowspark

Yes, it makes a difference. That feature requires matching versions of Excel
and Outlook. It doesn't work with Outlook Express at all.

--
Sue Mosher, Outlook MVP
   Author of Microsoft Outlook 2007 Programming:
     Jumpstart for Power Users and Administrators
   http://www.outlookcode.com/article.aspx?id=54

Well, that did it! Thank you very much, that was exactly the answer I
was looking for!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top