Redemption GetSharedDefaultFolder Outlook Security issue?

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
 
D

Dmitry Streblechenko \(MVP\)

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
 
J

John Dempsey

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


John Dempsey said:
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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
K

Ken Slovak - [MVP - Outlook]

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

Dmitry Streblechenko \(MVP\)

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
 
J

John Dempsey

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
J

John Dempsey

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 

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