Outlook 2003 Object Model Guard

G

Guest

Hi there everyone ... or anyone listening :)

I want to send emails with attachments to a subscription list (not spam) of
over a 100 recipients which means that a programmatic solution is best.
Unfortunately the Object Model Guard in Outlook 2003 brings up those annoying
warning windows. I can fully appreciate the need for the guard but for those
of us that do not generate malignant code, it is a nuisance.

I have read earlier posts by others where reference was made to various
Microsoft articles talking about various solutions (CDO, Redemption etc) but
for a minor VBA'er like me with not that level of developer experience (and
who wants to come up with a quick solution for my own purposes), I found the
information quite daunting. Can anyone who has had similar experiences
suggest an easy way to accomplish my task without bringing in the big
developer guns?

Many thanks in anticipation :)
 
G

Guest

Hi Michael,

Thanks for the suggestion. From Sue's Site, I followed a link to "What's New
in Microsoft Office Outlook 2003 for Developers?" on the MSDN site where a
simple example highlighted the concept ...

Sub TrustedCode()
Dim olApp As Outlook.Application
Set olApp = Application
Dim oMail As Outlook.MailItem
Set oMail = olApp.Session.GetDefaultFolder(olFolderInbox).Items(1)
MsgBox oMail.SenderEmailAddress, vbInformation
End Sub

I modified the line "Set oMail =
olApp.Session.GetDefaultFolder(olFolderInbox).Items(1)" to "Set oMail =
olApp.CreateItem(olMailItem)", removed MsgBox and added "oMail.Send" and it
seems to work just fine now.

Again many thanks Michael .... btw what does "Viele Grüße" mean?

vbaffled (not as much as before though) ... :)
 
M

Michael Bauer

Ah, now I do understand. I´ve found the translation for baffle. Very
creative :)
 

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