Re: Searching items in non-visible folder?

From: Eric Legault [MVP - Outlook] (elegaultZZZ_at_REMOVEZZZmvps.org)
Date: 12/16/04

  • Next message: Joel: "Re: form"
    Date: Wed, 15 Dec 2004 19:35:03 -0800
    
    

    Then you most definitely don't have CDO installed on that system. Go through
    Office setup, expand the Outlook section and ensure that Collaboration Data
    Objects is installed.

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

  • Next message: Joel: "Re: form"

    Relevant Pages

    • Re: Missing Addrees Book in Outlook 2007
      ... So I have no idea how to create a different "profile". ... Milly Staples [MVP - Outlook] ... | I also used the Windows Easy Transfer process with a USB Easy ... Select the Contacts folder ...
      (microsoft.public.office.misc)
    • Re: Restoring backup Outlook.pst
      ... You can close any PST file that still has a valid connection to the profile or that is not your default PST. ... If the PST file you want to use is not your default, you can designate it as such in Outlook, restart Outlook, then close any other PST file you do not want to use. ... Outlook help and looked up removing Contacts folder and removed the first on ...
      (microsoft.public.outlook.installation)
    • Re: Problems importing/recovering old PST
      ... There is no folder named documents. ... What is the "profile" and what directories and files are part of it? ... I do not see what harm renaming a pst file would cause. ... As far as your Outlook profile is concerned, ...
      (microsoft.public.outlook.installation)
    • Re: Deleting sent items from a mailbox
      ... OutlookSpy - Outlook, CDO ... "Dmitry Streblechenko" wrote: ... accessing the profile. ...
      (microsoft.public.win32.programmer.messaging)
    • Re: Deleted Item not in deleted folder?
      ... you will get errors trying to instantiate a MAPI.Session if CDO 1.21 ... A piggy-back logon won't do you any good at all if Outlook isn't running. ... Or you can use the profile name if you know it: ...
      (microsoft.public.outlook.program_vba)

    Loading