PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Security update in OUTLLIB.DLL broke Outlook NameSpace code

Reply

Security update in OUTLLIB.DLL broke Outlook NameSpace code

 
Thread Tools Rate Thread
Old 08-11-2004, 04:56 PM   #1
John Lee
Guest
 
Posts: n/a
Default Security update in OUTLLIB.DLL broke Outlook NameSpace code


I'm using OOM in Outlook 2000 to access mailboxes. After the machine is
updated with an Outlook Security Update, I could not access the properties
of the olNameSpance object. Below is the section of code having the
problem. Any idea how to work around the new security update? OOM is used
because my code needs to access users' calendars based on the access given
to my login profile through the calendar delegate setup.



'------------------------------------------------------------------

Dim olApp

Dim olNameSpace



Set olApp = CreateObject("Outlook.Application")

Set olNameSpace = olApp.GetNamespace("MAPI")

olNameSpace.Logon "MyOutlookProfile", "", False, True



' The following line does not work anymore.

MsgBox olNameSpace.CurrentUser





If Not olNameSpace Is Nothing Then
olNameSpace.Logoff
Set olNameSpace = Nothing
End If

olApp.Quit
Set olApp = Nothing

'------------------------------------------------------------------



Thanks for any feedback / comments in advance.



John




  Reply With Quote
Old 08-11-2004, 05:09 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Security update in OUTLLIB.DLL broke Outlook NameSpace code

CurrentUser is one of many properties that trigger a security dialog that
the user will need to respond to. Your code needs to handle the error that
will be raised if the user says No to the security prompt.

You might want to look at Redemption from
http://www.dimastr.com/redemption/, which avoids the prompts.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"John Lee" <john.k.lee@fmr.com> wrote in message
news:ewqKyPbxEHA.3024@TK2MSFTNGP14.phx.gbl...
> I'm using OOM in Outlook 2000 to access mailboxes. After the machine is
> updated with an Outlook Security Update, I could not access the properties
> of the olNameSpance object. Below is the section of code having the
> problem. Any idea how to work around the new security update? OOM is
> used
> because my code needs to access users' calendars based on the access given
> to my login profile through the calendar delegate setup.
>
>
>
> '------------------------------------------------------------------
>
> Dim olApp
>
> Dim olNameSpace
>
>
>
> Set olApp = CreateObject("Outlook.Application")
>
> Set olNameSpace = olApp.GetNamespace("MAPI")
>
> olNameSpace.Logon "MyOutlookProfile", "", False, True
>
>
>
> ' The following line does not work anymore.
>
> MsgBox olNameSpace.CurrentUser
>
>
>
>
>
> If Not olNameSpace Is Nothing Then
> olNameSpace.Logoff
> Set olNameSpace = Nothing
> End If
>
> olApp.Quit
> Set olApp = Nothing
>
> '------------------------------------------------------------------
>
>
>
> Thanks for any feedback / comments in advance.
>
>
>
> John
>
>
>
>



  Reply With Quote
Old 08-11-2004, 05:38 PM   #3
Michael Bauer
Guest
 
Posts: n/a
Default Re: Security update in OUTLLIB.DLL broke Outlook NameSpace code

Hi Kohn,

please read this site:

Microsoft Outlook "Object Model Guard" Security Issues for Developers:
http://www.outlookcode.com/d/sec.htm

--
Viele Grüße
Michael Bauer


"John Lee" <john.k.lee@fmr.com> wrote in message
news:ewqKyPbxEHA.3024@TK2MSFTNGP14.phx.gbl...
> I'm using OOM in Outlook 2000 to access mailboxes. After the machine

is
> updated with an Outlook Security Update, I could not access the

properties
> of the olNameSpance object. Below is the section of code having the
> problem. Any idea how to work around the new security update? OOM is

used
> because my code needs to access users' calendars based on the access

given
> to my login profile through the calendar delegate setup.
>
>
>
> '------------------------------------------------------------------
>
> Dim olApp
>
> Dim olNameSpace
>
>
>
> Set olApp = CreateObject("Outlook.Application")
>
> Set olNameSpace = olApp.GetNamespace("MAPI")
>
> olNameSpace.Logon "MyOutlookProfile", "", False, True
>
>
>
> ' The following line does not work anymore.
>
> MsgBox olNameSpace.CurrentUser
>
>
>
>
>
> If Not olNameSpace Is Nothing Then
> olNameSpace.Logoff
> Set olNameSpace = Nothing
> End If
>
> olApp.Quit
> Set olApp = Nothing
>
> '------------------------------------------------------------------
>
>
>
> Thanks for any feedback / comments in advance.
>
>
>
> John
>
>
>
>


  Reply With Quote
Old 08-11-2004, 06:43 PM   #4
John Lee
Guest
 
Posts: n/a
Default Re: Security update in OUTLLIB.DLL broke Outlook NameSpace code

Thanks Sue. I'm actually running the code as a service. Is there any way
to by pass that without a code change (such as using Redemption)?


"Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message
news:%23mQPDdbxEHA.2876@TK2MSFTNGP12.phx.gbl...
> CurrentUser is one of many properties that trigger a security dialog that
> the user will need to respond to. Your code needs to handle the error that
> will be raised if the user says No to the security prompt.
>
> You might want to look at Redemption from
> http://www.dimastr.com/redemption/, which avoids the prompts.
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "John Lee" <john.k.lee@fmr.com> wrote in message
> news:ewqKyPbxEHA.3024@TK2MSFTNGP14.phx.gbl...
> > I'm using OOM in Outlook 2000 to access mailboxes. After the machine is
> > updated with an Outlook Security Update, I could not access the

properties
> > of the olNameSpance object. Below is the section of code having the
> > problem. Any idea how to work around the new security update? OOM is
> > used
> > because my code needs to access users' calendars based on the access

given
> > to my login profile through the calendar delegate setup.
> >
> >
> >
> > '------------------------------------------------------------------
> >
> > Dim olApp
> >
> > Dim olNameSpace
> >
> >
> >
> > Set olApp = CreateObject("Outlook.Application")
> >
> > Set olNameSpace = olApp.GetNamespace("MAPI")
> >
> > olNameSpace.Logon "MyOutlookProfile", "", False, True
> >
> >
> >
> > ' The following line does not work anymore.
> >
> > MsgBox olNameSpace.CurrentUser
> >
> >
> >
> >
> >
> > If Not olNameSpace Is Nothing Then
> > olNameSpace.Logoff
> > Set olNameSpace = Nothing
> > End If
> >
> > olApp.Quit
> > Set olApp = Nothing
> >
> > '------------------------------------------------------------------
> >
> >
> >
> > Thanks for any feedback / comments in advance.
> >
> >
> >
> > John
> >
> >
> >
> >

>
>



  Reply With Quote
Old 08-11-2004, 06:59 PM   #5
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Security update in OUTLLIB.DLL broke Outlook NameSpace code

Outlook is not suitable to use in services. You need to take a different
approach. What does your service do? See
http://www.outlookcode.com/d/sec.htm for more on the security prompts.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"John Lee" <john.k.lee@fmr.com> wrote in message
news:O1x$WLcxEHA.2676@TK2MSFTNGP12.phx.gbl...
> Thanks Sue. I'm actually running the code as a service. Is there any way
> to by pass that without a code change (such as using Redemption)?
>
>
> "Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message
> news:%23mQPDdbxEHA.2876@TK2MSFTNGP12.phx.gbl...
>> CurrentUser is one of many properties that trigger a security dialog that
>> the user will need to respond to. Your code needs to handle the error
>> that
>> will be raised if the user says No to the security prompt.
>>
>> You might want to look at Redemption from
>> http://www.dimastr.com/redemption/, which avoids the prompts.


>>
>> "John Lee" <john.k.lee@fmr.com> wrote in message
>> news:ewqKyPbxEHA.3024@TK2MSFTNGP14.phx.gbl...
>> > I'm using OOM in Outlook 2000 to access mailboxes. After the machine
>> > is
>> > updated with an Outlook Security Update, I could not access the

> properties
>> > of the olNameSpance object. Below is the section of code having the
>> > problem. Any idea how to work around the new security update? OOM is
>> > used
>> > because my code needs to access users' calendars based on the access

> given
>> > to my login profile through the calendar delegate setup.
>> >
>> >
>> >
>> > '------------------------------------------------------------------
>> >
>> > Dim olApp
>> >
>> > Dim olNameSpace
>> >
>> >
>> >
>> > Set olApp = CreateObject("Outlook.Application")
>> >
>> > Set olNameSpace = olApp.GetNamespace("MAPI")
>> >
>> > olNameSpace.Logon "MyOutlookProfile", "", False, True
>> >
>> >
>> >
>> > ' The following line does not work anymore.
>> >
>> > MsgBox olNameSpace.CurrentUser
>> >
>> >
>> >
>> >
>> >
>> > If Not olNameSpace Is Nothing Then
>> > olNameSpace.Logoff
>> > Set olNameSpace = Nothing
>> > End If
>> >
>> > olApp.Quit
>> > Set olApp = Nothing



  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