Re: Searching items in non-visible folder?

From: John Riddle (jriddleatsignwilsongroupnyperiodcom)
Date: 12/15/04


Date: Wed, 15 Dec 2004 17:11:15 -0500

Hmmm....

I'm having problems getting past the first step. I've tried the examples on
that page and they don't seem to work as code behind the form. I've also
tried some samples from CDOLive.com site, but I keep getting the error:

"ActiveX component can't create object: 'MAPI.Session'
Error: 800A01AD

All I'm testing is a simple Logon script for now:

Dim objSession
Set objSession = CreateObject("MAPI.Session") 'This is the line where it
breaks
objSession.Logon "Administrator", "Password", False, False, 0

Could you tell me what would be wrong?

Thanks,

John

"Eric Legault [MVP - Outlook]" <elegaultZZZ@REMOVEZZZmvps.org> wrote in
message news:2D86F7AF-A9AB-47F3-A7F8-7A03DB468FA3@microsoft.com...
> CDO has a Filter property you can set for a Messages collection.
>
> If you logon using an existing profile, those permissions apply to code
> access as well. So if the user doesn't have read permissions for a
> folder,
> you would not be able to gain access to it.
>
> You can use the ProfileInfo parameter of the Logon method to create a
> temporary profile using a username and password for an account that has
> the
> permissions you require. See that link I pointed you to for info on how
> to
> do that.
>
> --
> Eric Legault - B.A, MCP, MCSD, Outlook MVP
> --------------------------------------------------
> {Private e-mails ignored}
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/
>
>
>
> "John Riddle" wrote:
>
>> Eric,
>>
>> Does CDO have a restriction method or do I need to loop through all the
>> items in the folder looking for the messages that I want? Also, if the
>> default Outlook profile being used does not have permission to read items
>> in
>> that folder and I populate a listbox based on these items and open double
>> click an item on the list, would the user still be able to open and read
>> that item?
>>
>> Thanks for all your help!
>>
>> John
>>
>> "Eric Legault [MVP - Outlook]" <elegaultZZZ@REMOVEZZZmvps.org> wrote in
>> message news:9F00D285-3369-4828-B66F-9040D97CC280@microsoft.com...
>> > You can use CDO's Session object and Logon method to gain access to
>> > Exchange
>> > stores (Mailboxes, Public Folders) with different credentials than the
>> > currently logged on user.
>> >
>> > See this link for more info:
>> >
>> > How To Log On to Exchange with the ProfileInfo Parameter:
>> > http://support.microsoft.com/default.aspx?scid=kb;en-us;195662
>> >
>> > --
>> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
>> > --------------------------------------------------
>> > {Private e-mails ignored}
>> > Job: http://www.imaginets.com
>> > Blog: http://blogs.officezealot.com/legault/
>> >
>> > "John Riddle" wrote:
>> >
>> >> Hello All,
>> >>
>> >> We currently set Exchange to Auto Archive all mail to a public mail
>> >> folder.
>> >> Obviously, read/edit access to this folder is disabled so that users
>> >> can't
>> >> read other user's personal email. However, we have sales contacts that
>> >> all
>> >> the sales people need to be able to view all communication
>> >> company-wide
>> >> for
>> >> a particular contact. Therefore, I need to search this public mail
>> >> folder
>> >> for items
>> >> relating to a contact (based on the contact's email address) and list
>> >> all
>> >> email to/from that business contact. Obviously, the public mail folder
>> >> contains many, many items so search speed will be important factor in
>> >> addition to the script that I write needs a way to log on as a user
>> >> with
>> >> "Read" access on the folder (instead of the user's windows log-on
>> >> credentials).
>> >>
>> >> Can anyone offer a suggestion as to possible methods of accomplishing
>> >> this?
>> >> Can I logon using different credentials that have read access to the
>> >> folder
>> >> via script behind the form? WebDAV? ADO? CDO? Anyone know of samples
>> >> out
>> >> there?
>> >>
>> >> Thanks,
>> >>
>> >> John
>> >>
>> >>
>> >>
>>
>>
>>



Relevant Pages

  • Re: Local permissions for roaming profile to work
    ... see the permissions on the Roaming$ share which has the Administrators group ... access the folder unless I add the Administrators to the permissions tab. ... The effect I am seeing at the PC (where I have a test profile with a couple ...
    (microsoft.public.windows.server.sbs)
  • Bad bug in MS ACL API and seems to have been there for years!
    ... permissions from domain A with equivalent permissions from domain B - that ... for the account on the target domain, and point that to the existing profile ... folder, ... It is then supposed to re-ACL the profile ...
    (microsoft.public.windows.server.security)
  • Re: Is this a GPO setting or not?
    ... Sounds to me that the permissions on the Documents and Setting folder have ... If Users are removed from the permissions on the Documents and Settings ... folder, a user that does not already have a profile, can't create one and ... The user's account specifically gets Full Control ...
    (microsoft.public.win2000.group_policy)
  • Re: Searching items in non-visible folder?
    ... If you logon using an existing profile, those permissions apply to code ... So if the user doesn't have read permissions for a folder, ...
    (microsoft.public.outlook.program_forms)
  • Re: Roaming profiles and logon rights
    ... Each user has a click to allow then dial in permissions. ... User permissions for the roaming profile question. ... >ok even installing and using VPN. ... >the new user cannot logon any workstation on the network. ...
    (microsoft.public.backoffice.smallbiz2000)