Redemption GetSharedDefaultFolder Outlook Security issue?

  • Thread starter Thread starter John Dempsey
  • Start date Start date
J

John Dempsey

Hi guys is there anyway I can get to a Shared Default Folder without
having the Security box come up. I use Redemption and can see the
CreateRecipient method but cant get it to work? Want to basically log
into a Mailbox and process incoming emails with attachments. I have
accomplished everything except fo getting rid of this Security issue.
Some sample code just to point me in the right direction would be
good.

Thanks in advance.

JED
 
You can use Namespace.GetSharedDefaultFolder in OOM without triggering the
prompt: the rule of thumb is *not* to call Recipient.Resolve after calling
Namespace.CreateRecipient.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
This is the code that brings the security measure. Its Outlook 2003?

Dim OlRecipient As Outlook.Recipient

Set myOlApp = CreateObject("Outlook.Application")
Set sItem = CreateObject("Redemption.SafeMailItem")
Set OlNamespace = OlApp.GetNamespace("MAPI")
Set OlRecipient = OlNamespace.CreateRecipient("MyMailBox")

It brings up the security error every time! Any ideas.

Thanks

John D

Redemption GetSharedDefaultFolder Outlook Security issue?
From: John Dempsey
Date Posted: 5/18/2004 11:50:00 AM



Hi guys is there anyway I can get to a Shared Default Folder without
having the Security box come up. I use Redemption and can see the
CreateRecipient method but cant get it to work? Want to basically log
into a Mailbox and process incoming emails with attachments. I have
accomplished everything except fo getting rid of this Security issue.
Some sample code just to point me in the right direction would be
good.

Thanks in advance.

JED


Re: Redemption GetSharedDefaultFolder Outlook Security issue?
From: Dmitry Streblechenko \(MVP\)
Date Posted: 5/18/2004 12:51:00 PM



You can use Namespace.GetSharedDefaultFolder in OOM without triggering
the
prompt: the rule of thumb is *not* to call Recipient.Resolve after
calling
Namespace.CreateRecipient.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Reading a recipient is locked down. Use Redemption for that with a
SafeRecipient.
 
Are you sure? If you have OutlookSpy installed, click "Script Editor", paste
the following code and click Run

Set NS = Application.GetNamespace("MAPI")
Set Recip = NS.CreateRecipient("MyMailBox")
set Folder = NS.GetSharedDefaultFolder(Recip, olFolderCalendar)
MsgBox Folder.Items.Count

No prompts are displayed. If you add a Recip.Resolve line, you will get a
prompt.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
So would this do the job?

Dim oSafeRecipient As SafeRecipient
Dim oUtils As Object
Set oUtils = CreateObject("Redemption.MAPIUtils")
Set oSafeRecipient = oUtils.CreateRecipient("MyMailbox")

Cheers
John


Re: Redemption GetSharedDefaultFolder Outlook Security issue?
From: Ken Slovak - [MVP - Outlook]
Date Posted: 5/19/2004 8:20:00 AM



Reading a recipient is locked down. Use Redemption for that with a
SafeRecipient.




John Dempsey said:
This is the code that brings the security measure. Its Outlook 2003?

Dim OlRecipient As Outlook.Recipient

Set myOlApp = CreateObject("Outlook.Application")
Set sItem = CreateObject("Redemption.SafeMailItem")
Set OlNamespace = OlApp.GetNamespace("MAPI")
Set OlRecipient = OlNamespace.CreateRecipient("MyMailBox")

It brings up the security error every time! Any ideas.

Thanks

John D

Thanks

John D
 
Problem solved. Thanks Dmitry.

The problem seemed to be using the OlNamespace and OlRecipient
variables. As soon as I changed to something OlNS and OlRecip all was
well.

Doesnt sound right though?!!!

Anyway thanks for all your help really driving me crazy that was.

Cheers

John D
 
Back
Top