Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 49948

Help with Emailing Selection Direct from Excel 2010 - Error 430 - Automation not supported

$
0
0
Hey Guys,

I've reached out before and had help about issues, so I'm turning back to you guys, as I'm stumped, and Google can't help me.

I have an excel spreadsheet setup, it copies data from another sheet, sets everything up, highlights a section of an active sheet and then it is supposed to email a list of people the data.

It was working for the past week or two, all of a sudden it has stopped, I don't know if Windows has done an update, or Office has done an update, or the fact of installing Lync 2010 is causing the problem. I have highlighted the part I feel is causing the issues, I am using Outlook 2010, and I'm using Excel 2010 and when I run it, mail envelope lines appear, ready for the To: CC: and Subject (which just currently fills with the spreadsheet name before it error's out)

Using the code of


Code:

  ActiveSheet.Range("J35:K44").Select
 

  ActiveWorkbook.EnvelopeVisible = True
 
  With ActiveSheet.MailEnvelope

        .Item.To = "email@address.com"
        .Item.Subject = "This is my Subject Line"
        .Item.Send
       
    End With

   
    ActiveWorkbook.EnvelopeVisible = False
   
    ActiveSheet.Range("J35:K44").Select
   
    Selection.Copy

[I know the last part of the code, looks like the first part, that is so I can just copy the selection to clipboard]

But when I run the macro I get the error 'Run-time error '430':Class does not support Automation or does not support expected interface'

Error.jpg

I believe nothing has changed with the 'References' in the 'Tools' part of VBA.

Can anybody help me and/or point me in the right direction.
Regards

Viewing all articles
Browse latest Browse all 49948

Trending Articles