Searching items in non-visible folder?

J

John Riddle

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
 
J

John Riddle

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
 
E

Eric Legault [MVP - Outlook]

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/
 
J

John Riddle

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
 
E

Eric Legault [MVP - Outlook]

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.
 
J

John Riddle

Well, I re-installed it but it said that it was already installed. Also, I
had Microsoft CDO for Windows checked as a reference in my Outlook VBA
project. So it must have been there.

Anyway, I re-installed it making sure "Run All From My Computer" was
selected for CDO on the disc.

I'm seeming to get past the CreateObject line, but having problems with the
Logon. I get an error saying:

Error loading DLL: 'Logon'

Here's my code so far:

Dim objSession
Set objSession = CreateObject("MAPI.Session")
objSession.Logon "Administrator", "Password", False, True, 0, True,
"server1" & vbLf & "Administrator"
msgBox "All done."

I've also tried it this way:

Dim objSession
Set objSession = CreateObject("MAPI.Session")
strProfileInfo = "wilsongroup1" & vbLf & "Administrator"
objSession.Logon "", "JRiddle#1", False, True, 0, False, strProfileInfo

Could you tell me how to logon to the Exchange server under a different
account (not from the Exchange server). Have you ever actually gotten this
to work? If so, could you post a snippet of the code that logs onto the
server with different permissions that the currently logged on user?

Thanks,

John
 
J

John Riddle

Update:

This code works just fine from the server, but does not work from my
workstation. Actually, from the workstation, I'm already logged on as
"Administrator". When I installed Outlook originally, I installed with "Run
All from this computer" for every Outlook feature. And this morning
re-installed and got past the "CreateObject" line, but cannot get past the
logon line.

From the server (Exchange), I can logon, create and send a message no
problem. I do have the Exchange Enterprise Manager installed on the
workstation in question. Does that make a difference? It of coarse is also
installed on the Exchange server and it's not causing a problem there.

John
 
E

Eric Legault [MVP - Outlook]

Make sure that the reference you are using is "Microsoft CDO 1.21 Library",
NOT "Microsoft CDO for Windows" (that's CDOSYS for Windows 2000).

Is this code in a macro or behind a custom form? When you said you set a
reference, I'm now thinking this is a macro; if it is, I suggest you add an
"Option Explicit" statement to the beginning of the module and use
early-binding for CDO 1.21. Then declare:

Dim objSession As MAPI.Session

Set objSession = New MAPI.Session
If objSession Is Nothing Then
'Something is wrong
End If

At this point, if you are referencing the correct CDO 1.21 library and it is
installed, objSession will be a valid object.

Also, you must be logged on to Windows with an account that has read access
to the mailbox you are opening with Session.Logon.
 
J

John Riddle

I only said that I set a reference to prove that I had "CDO" on my machine.
The code that I'm using at the moment is behind a contact form. (vbscript)

Actually, you may have told me the problem.

I can make the code work on the Exchange machine. However, I am logged on as
Administrator and do have the Administrator mailbox open on the workstation
where I'm not able to get the code to work. However, as I said in the
original posting. I need to be able to logon to the Exchange server as
Administrator (or some other account created with permissions on the hidden
folder). It sounds like now your telling me that CDO is not a viable
solution for what I want to do.

I have a mail folder where all mail coming through the Exchange server is
archived. I need to be able to search that folder from script behind a
contact form and display items related to that contact (items that are sent
to or from the contacts email address) that are located in that hidden
folder. The folder needs to be a hidden folder to all users because I can't
have the users browsing through it and reading everyone else's personal
email. However, when a business contact is opened, I need to be able to
search through that folder and list only the items that are related to that
contact from the folder. Does this make sense? I was originally asking what
technology to use to accomplish this and you said that using CDO I could
logon as a different user than the user was currently logged on as. I'm not
sure what you mean by the last line of your message. I'm not reading a
mailbox. This is a public folder that I want to search through the items and
display selected ones.

Thanks,

John


Eric Legault said:
Make sure that the reference you are using is "Microsoft CDO 1.21
Library",
NOT "Microsoft CDO for Windows" (that's CDOSYS for Windows 2000).

Is this code in a macro or behind a custom form? When you said you set a
reference, I'm now thinking this is a macro; if it is, I suggest you add
an
"Option Explicit" statement to the beginning of the module and use
early-binding for CDO 1.21. Then declare:

Dim objSession As MAPI.Session

Set objSession = New MAPI.Session
If objSession Is Nothing Then
'Something is wrong
End If

At this point, if you are referencing the correct CDO 1.21 library and it
is
installed, objSession will be a valid object.

Also, you must be logged on to Windows with an account that has read
access
to the mailbox you are opening with Session.Logon.

--
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 said:
Well, I re-installed it but it said that it was already installed. Also,
I
had Microsoft CDO for Windows checked as a reference in my Outlook VBA
project. So it must have been there.

Anyway, I re-installed it making sure "Run All From My Computer" was
selected for CDO on the disc.

I'm seeming to get past the CreateObject line, but having problems with
the
Logon. I get an error saying:

Error loading DLL: 'Logon'

Here's my code so far:

Dim objSession
Set objSession = CreateObject("MAPI.Session")
objSession.Logon "Administrator", "Password", False, True, 0, True,
"server1" & vbLf & "Administrator"
msgBox "All done."

I've also tried it this way:

Dim objSession
Set objSession = CreateObject("MAPI.Session")
strProfileInfo = "wilsongroup1" & vbLf & "Administrator"
objSession.Logon "", "JRiddle#1", False, True, 0, False, strProfileInfo

Could you tell me how to logon to the Exchange server under a different
account (not from the Exchange server). Have you ever actually gotten
this
to work? If so, could you post a snippet of the code that logs onto the
server with different permissions that the currently logged on user?

Thanks,

John

Eric Legault said:
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/

:

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


in
message 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/



:

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]" <[email protected]>
wrote
in
message 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/

:

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
 
E

Eric Legault [MVP - Outlook]

I believe you will need to hard code a password in your code to use the Logon
method with an account name that has at least read access to the Public
Folder. I'm not near my test environment today so I can't verify this for
you. Even then, you probably don't want to do this.

Otherwise, I don't think you can impersonate an account with greater
credentials than the currently logged on Windows account. This account needs
read permissions to any Public Folder or Mailbox that you are accessing.

Maybe somebody else can jump in and verify this; I've had headaches with
these scenarios in the past and I can't remember what you can and cant' do
with a good degree of certainty.

--
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 said:
I only said that I set a reference to prove that I had "CDO" on my machine.
The code that I'm using at the moment is behind a contact form. (vbscript)

Actually, you may have told me the problem.

I can make the code work on the Exchange machine. However, I am logged on as
Administrator and do have the Administrator mailbox open on the workstation
where I'm not able to get the code to work. However, as I said in the
original posting. I need to be able to logon to the Exchange server as
Administrator (or some other account created with permissions on the hidden
folder). It sounds like now your telling me that CDO is not a viable
solution for what I want to do.

I have a mail folder where all mail coming through the Exchange server is
archived. I need to be able to search that folder from script behind a
contact form and display items related to that contact (items that are sent
to or from the contacts email address) that are located in that hidden
folder. The folder needs to be a hidden folder to all users because I can't
have the users browsing through it and reading everyone else's personal
email. However, when a business contact is opened, I need to be able to
search through that folder and list only the items that are related to that
contact from the folder. Does this make sense? I was originally asking what
technology to use to accomplish this and you said that using CDO I could
logon as a different user than the user was currently logged on as. I'm not
sure what you mean by the last line of your message. I'm not reading a
mailbox. This is a public folder that I want to search through the items and
display selected ones.

Thanks,

John


Eric Legault said:
Make sure that the reference you are using is "Microsoft CDO 1.21
Library",
NOT "Microsoft CDO for Windows" (that's CDOSYS for Windows 2000).

Is this code in a macro or behind a custom form? When you said you set a
reference, I'm now thinking this is a macro; if it is, I suggest you add
an
"Option Explicit" statement to the beginning of the module and use
early-binding for CDO 1.21. Then declare:

Dim objSession As MAPI.Session

Set objSession = New MAPI.Session
If objSession Is Nothing Then
'Something is wrong
End If

At this point, if you are referencing the correct CDO 1.21 library and it
is
installed, objSession will be a valid object.

Also, you must be logged on to Windows with an account that has read
access
to the mailbox you are opening with Session.Logon.

--
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 said:
Well, I re-installed it but it said that it was already installed. Also,
I
had Microsoft CDO for Windows checked as a reference in my Outlook VBA
project. So it must have been there.

Anyway, I re-installed it making sure "Run All From My Computer" was
selected for CDO on the disc.

I'm seeming to get past the CreateObject line, but having problems with
the
Logon. I get an error saying:

Error loading DLL: 'Logon'

Here's my code so far:

Dim objSession
Set objSession = CreateObject("MAPI.Session")
objSession.Logon "Administrator", "Password", False, True, 0, True,
"server1" & vbLf & "Administrator"
msgBox "All done."

I've also tried it this way:

Dim objSession
Set objSession = CreateObject("MAPI.Session")
strProfileInfo = "wilsongroup1" & vbLf & "Administrator"
objSession.Logon "", "JRiddle#1", False, True, 0, False, strProfileInfo

Could you tell me how to logon to the Exchange server under a different
account (not from the Exchange server). Have you ever actually gotten
this
to work? If so, could you post a snippet of the code that logs onto the
server with different permissions that the currently logged on user?

Thanks,

John

message 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/

:

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


in
message 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/



:

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]" <[email protected]>
wrote
in
message 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/

:

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
 
J

John Riddle

Eric,

Thanks for getting back to me. Yes, I was trying to hard code the account
information (username and password). We have a small office (about 10
users). I know that code behind an Outlook form is not terribly secure, but
my users are definitely not going to be able to get to it. They'd have to
bring someone in who would know what their doing, but as of this point, they
don't even know that this folder exists. If I provide a list box that lists
the items relating to a contact, they would have no idea that it actually
comes from a folder that contains any sensitive information. I'm not at all
concerned about security other than not having the folder appear in the
Public Folders list.

Can you give me a quick example of setting a reference to a particular
public folder and then using the "restrict" method that you mentioned
earlier? I have not been able to find any documentation on that method for
CDO. I'm used to using the OOM.

Thanks,

John

Eric Legault said:
I believe you will need to hard code a password in your code to use the
Logon
method with an account name that has at least read access to the Public
Folder. I'm not near my test environment today so I can't verify this for
you. Even then, you probably don't want to do this.

Otherwise, I don't think you can impersonate an account with greater
credentials than the currently logged on Windows account. This account
needs
read permissions to any Public Folder or Mailbox that you are accessing.

Maybe somebody else can jump in and verify this; I've had headaches with
these scenarios in the past and I can't remember what you can and cant' do
with a good degree of certainty.

--
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 said:
I only said that I set a reference to prove that I had "CDO" on my
machine.
The code that I'm using at the moment is behind a contact form.
(vbscript)

Actually, you may have told me the problem.

I can make the code work on the Exchange machine. However, I am logged on
as
Administrator and do have the Administrator mailbox open on the
workstation
where I'm not able to get the code to work. However, as I said in the
original posting. I need to be able to logon to the Exchange server as
Administrator (or some other account created with permissions on the
hidden
folder). It sounds like now your telling me that CDO is not a viable
solution for what I want to do.

I have a mail folder where all mail coming through the Exchange server is
archived. I need to be able to search that folder from script behind a
contact form and display items related to that contact (items that are
sent
to or from the contacts email address) that are located in that hidden
folder. The folder needs to be a hidden folder to all users because I
can't
have the users browsing through it and reading everyone else's personal
email. However, when a business contact is opened, I need to be able to
search through that folder and list only the items that are related to
that
contact from the folder. Does this make sense? I was originally asking
what
technology to use to accomplish this and you said that using CDO I could
logon as a different user than the user was currently logged on as. I'm
not
sure what you mean by the last line of your message. I'm not reading a
mailbox. This is a public folder that I want to search through the items
and
display selected ones.

Thanks,

John


Eric Legault said:
Make sure that the reference you are using is "Microsoft CDO 1.21
Library",
NOT "Microsoft CDO for Windows" (that's CDOSYS for Windows 2000).

Is this code in a macro or behind a custom form? When you said you set
a
reference, I'm now thinking this is a macro; if it is, I suggest you
add
an
"Option Explicit" statement to the beginning of the module and use
early-binding for CDO 1.21. Then declare:

Dim objSession As MAPI.Session

Set objSession = New MAPI.Session
If objSession Is Nothing Then
'Something is wrong
End If

At this point, if you are referencing the correct CDO 1.21 library and
it
is
installed, objSession will be a valid object.

Also, you must be logged on to Windows with an account that has read
access
to the mailbox you are opening with Session.Logon.

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
--------------------------------------------------
{Private e-mails ignored}
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/

:

Well, I re-installed it but it said that it was already installed.
Also,
I
had Microsoft CDO for Windows checked as a reference in my Outlook VBA
project. So it must have been there.

Anyway, I re-installed it making sure "Run All From My Computer" was
selected for CDO on the disc.

I'm seeming to get past the CreateObject line, but having problems
with
the
Logon. I get an error saying:

Error loading DLL: 'Logon'

Here's my code so far:

Dim objSession
Set objSession = CreateObject("MAPI.Session")
objSession.Logon "Administrator", "Password", False, True, 0, True,
"server1" & vbLf & "Administrator"
msgBox "All done."

I've also tried it this way:

Dim objSession
Set objSession = CreateObject("MAPI.Session")
strProfileInfo = "wilsongroup1" & vbLf & "Administrator"
objSession.Logon "", "JRiddle#1", False, True, 0, False,
strProfileInfo

Could you tell me how to logon to the Exchange server under a
different
account (not from the Exchange server). Have you ever actually gotten
this
to work? If so, could you post a snippet of the code that logs onto
the
server with different permissions that the currently logged on user?

Thanks,

John

in
message 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/

:

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]" <[email protected]>
wrote
in
message 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/



:

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]" <[email protected]>
wrote
in
message
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/

:

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
 

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