PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Outlook 2003 Object Model Guard

Reply

Outlook 2003 Object Model Guard

 
Thread Tools Rate Thread
Old 08-11-2004, 10:15 AM   #1
=?Utf-8?B?dmJhZmZsZWQ=?=
Guest
 
Posts: n/a
Default Outlook 2003 Object Model Guard


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 :-)
  Reply With Quote
Old 08-11-2004, 11:29 AM   #2
Michael Bauer
Guest
 
Posts: n/a
Default Re: Outlook 2003 Object Model Guard

At Sue´s site you can find all informations:
http://www.outlookcode.com/d/sec.htm

In OL 2003 you can avoid the warnings by using the existing Application
object instead of CreateObject or GetObject.

--
Viele Grüße
Michael Bauer


"vbaffled" <vbaffled@discussions.microsoft.com> wrote in message
news:1F9EDA5B-8EF7-4920-93D9-B00F0D3F3ECB@microsoft.com...
> 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 :-)


  Reply With Quote
Old 09-11-2004, 10:09 AM   #3
=?Utf-8?B?dmJhZmZsZWQ=?=
Guest
 
Posts: n/a
Default Re: Outlook 2003 Object Model Guard

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) ... :-)

"Michael Bauer" wrote:

> At Sue´s site you can find all informations:
> http://www.outlookcode.com/d/sec.htm
>
> In OL 2003 you can avoid the warnings by using the existing Application
> object instead of CreateObject or GetObject.
>
> --
> Viele Grüße
> Michael Bauer
>
>
> "vbaffled" <vbaffled@discussions.microsoft.com> wrote in message
> news:1F9EDA5B-8EF7-4920-93D9-B00F0D3F3ECB@microsoft.com...
> > 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 :-)

>
>

  Reply With Quote
Old 09-11-2004, 11:00 AM   #4
Michael Bauer
Guest
 
Posts: n/a
Default OT: Re: Outlook 2003 Object Model Guard

Hi,

> .... btw what does "Viele Grüße" mean?


it´s german (where I come from) and means: many greetings.

> vbaffled (not as much as before though) ... :-)


I don´t understand that, too. Has "vbaffled" a meaning?

--
Viele Grüße
Michael Bauer

  Reply With Quote
Old 09-11-2004, 11:13 AM   #5
Michael Bauer
Guest
 
Posts: n/a
Default OT: Re: Outlook 2003 Object Model Guard

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

--
Viele Grüße
Michael Bauer

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off