View Single Post
  #7  
Old December 31st 08, 04:52 PM posted to microsoft.public.outlook.program_vba
wpiet
external usenet poster
 
Posts: 19
Default Can I disable Outlook warning from Excel macro "Send" method

Thanks, Ken. I didn't see your post before my response to JP. Yours answered
those questions of mine. Sounds like we're all on the same page, essentially.
I think I'm getting the idea. Thanks to both of you. You've been very helpful.

Will

"Ken Slovak - [MVP - Outlook]" wrote:

If you are running the code from the Outlook VBA project and you use
Application there as your Outlook.Application object you will have a trusted
Application object. Then you derive all of your other Outlook objects from
that trusted Application object and those objects will be trusted. That will
eliminate the security warnings.

You can use the Outlook VBA code to open Excel and the workbook you want and
use code to extract the contents you want for the emails, all within your
Outlook VBA code. That's the way I'd be doing it.

The Excel VBA macro code can be moved over to Outlook, you will need to add
starter code to start Excel and open the workbook, and to fully qualify all
Excel references (Excel.Range instead of Range, etc.). Then the code for the
email can be done using Outlook automation code.

There should be examples of that sort of thing up on www.outlookcode.com,
try searching there for "Excel" and see what turns up.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"wpiet" wrote in message
...
Thanks for the suggestion, Ken. I'll be looking into that.
Is it possible to, alternatively, start from Outlook, access the Excel
workbook & process the VBA macro there which creates the e-mails & sends
them?
I'm absolutely new at VB coding. I recorded the macro in Excel to set up
the
data for the e-mails, then had to figure out a way to add the code to that
macro to create & send the e-mails using that data. Everything works
perfectly except for having to manually reply to the "Object Model Guard."

Thanks,
Will



Ads