A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Code to open another user's inbox when I'm in cached exchange mode



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 5th 07, 10:51 PM posted to microsoft.public.outlook.program_vba
mcollins
external usenet poster
 
Posts: 3
Default Code to open another user's inbox when I'm in cached exchange mode

I am trying to execute the following code in cached exchange mode in a
workstation installation of Outlook 2003:

Public oMapi As NameSpace
Public ofFolder As MAPIFolder

Sub getPartnerPrivate()
Dim oFolders As Folders
Dim oRecip As Recipient

Set oMapi = Application.GetNamespace("MAPI")
Set oRecip = oMapi.CreateRecipient("partnerprivate")
oRecip.Resolve
Set ofFolder = oMapi.GetSharedDefaultFolder(oRecip, olFolderInbox)
ofFolder.Display
End Sub

Can't. I believe I need to write using Extended MAPI but have no idea.
Would anybody know?
--
Michael Collins
  #2  
Old October 5th 07, 11:40 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Code to open another user's inbox when I'm in cached exchange mode

Can't what? What symptoms tell you there's a problem? Does oRecip resolve to an Exchange user?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"mcollins" wrote in message ...
I am trying to execute the following code in cached exchange mode in a
workstation installation of Outlook 2003:

Public oMapi As NameSpace
Public ofFolder As MAPIFolder

Sub getPartnerPrivate()
Dim oFolders As Folders
Dim oRecip As Recipient

Set oMapi = Application.GetNamespace("MAPI")
Set oRecip = oMapi.CreateRecipient("partnerprivate")
oRecip.Resolve
Set ofFolder = oMapi.GetSharedDefaultFolder(oRecip, olFolderInbox)
ofFolder.Display
End Sub

Can't. I believe I need to write using Extended MAPI but have no idea.
Would anybody know?
--
Michael Collins

  #3  
Old October 6th 07, 02:44 PM posted to microsoft.public.outlook.program_vba
mcollins
external usenet poster
 
Posts: 3
Default Code to open another user's inbox when I'm in cached exchange

If the user I am testing this with is in cached exchange mode the code fails
on this line:

Set ofFolder = oMapi.GetSharedDefaultFolder(oRecip, olFolderInbox)

Outlook's error message is to the effect that it could not resolve the
oRecip value. If I take the user out of cached mode, the code works, the
inbox window opens.

I seem to have read somewhere that this is by design and that there might
be a solution using the MAPI_NO_CACHE flag in C++. However, I need a VBA
solution.
--
Michael Collins


"Sue Mosher [MVP-Outlook]" wrote:

Can't what? What symptoms tell you there's a problem? Does oRecip resolve to an Exchange user?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"mcollins" wrote in message ...
I am trying to execute the following code in cached exchange mode in a
workstation installation of Outlook 2003:

Public oMapi As NameSpace
Public ofFolder As MAPIFolder

Sub getPartnerPrivate()
Dim oFolders As Folders
Dim oRecip As Recipient

Set oMapi = Application.GetNamespace("MAPI")
Set oRecip = oMapi.CreateRecipient("partnerprivate")
oRecip.Resolve
Set ofFolder = oMapi.GetSharedDefaultFolder(oRecip, olFolderInbox)
ofFolder.Display
End Sub

Can't. I believe I need to write using Extended MAPI but have no idea.
Would anybody know?
--
Michael Collins


  #4  
Old October 6th 07, 07:48 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Code to open another user's inbox when I'm in cached exchange

What happens if you type partnerprivate into a message? Does it resolve to an Exchange user there? If not, that's your problem.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"mcollins" wrote in message ...
If the user I am testing this with is in cached exchange mode the code fails
on this line:

Set ofFolder = oMapi.GetSharedDefaultFolder(oRecip, olFolderInbox)

Outlook's error message is to the effect that it could not resolve the
oRecip value. If I take the user out of cached mode, the code works, the
inbox window opens.

I seem to have read somewhere that this is by design and that there might
be a solution using the MAPI_NO_CACHE flag in C++. However, I need a VBA
solution.
--
Michael Collins


"Sue Mosher [MVP-Outlook]" wrote:

Can't what? What symptoms tell you there's a problem? Does oRecip resolve to an Exchange user?

"mcollins" wrote in message ...
I am trying to execute the following code in cached exchange mode in a
workstation installation of Outlook 2003:

Public oMapi As NameSpace
Public ofFolder As MAPIFolder

Sub getPartnerPrivate()
Dim oFolders As Folders
Dim oRecip As Recipient

Set oMapi = Application.GetNamespace("MAPI")
Set oRecip = oMapi.CreateRecipient("partnerprivate")
oRecip.Resolve
Set ofFolder = oMapi.GetSharedDefaultFolder(oRecip, olFolderInbox)
ofFolder.Display
End Sub

Can't. I believe I need to write using Extended MAPI but have no idea.
Would anybody know?
--
Michael Collins


  #5  
Old October 7th 07, 03:46 AM posted to microsoft.public.outlook.program_vba
mcollins
external usenet poster
 
Posts: 3
Default Code to open another user's inbox when I'm in cached exchange

It resolves perfectly fine. In fact, I was hoping that doing this, i.e.,
sending an email to the private mailboxes from the user I installed the code
on, might solve the problem (we have a number of these private mailboxes),
but it was inconsistent. It sounds like you don't think this is expected
behavior.
--
Michael Collins


"Sue Mosher [MVP-Outlook]" wrote:

What happens if you type partnerprivate into a message? Does it resolve to an Exchange user there? If not, that's your problem.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"mcollins" wrote in message ...
If the user I am testing this with is in cached exchange mode the code fails
on this line:

Set ofFolder = oMapi.GetSharedDefaultFolder(oRecip, olFolderInbox)

Outlook's error message is to the effect that it could not resolve the
oRecip value. If I take the user out of cached mode, the code works, the
inbox window opens.

I seem to have read somewhere that this is by design and that there might
be a solution using the MAPI_NO_CACHE flag in C++. However, I need a VBA
solution.
--
Michael Collins


"Sue Mosher [MVP-Outlook]" wrote:

Can't what? What symptoms tell you there's a problem? Does oRecip resolve to an Exchange user?

"mcollins" wrote in message ...
I am trying to execute the following code in cached exchange mode in a
workstation installation of Outlook 2003:

Public oMapi As NameSpace
Public ofFolder As MAPIFolder

Sub getPartnerPrivate()
Dim oFolders As Folders
Dim oRecip As Recipient

Set oMapi = Application.GetNamespace("MAPI")
Set oRecip = oMapi.CreateRecipient("partnerprivate")
oRecip.Resolve
Set ofFolder = oMapi.GetSharedDefaultFolder(oRecip, olFolderInbox)
ofFolder.Display
End Sub

Can't. I believe I need to write using Extended MAPI but have no idea.
Would anybody know?
--
Michael Collins


  #6  
Old October 7th 07, 01:14 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Code to open another user's inbox when I'm in cached exchange

But does it resolve to an Exchange user or to a name in the Contacts folder?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"mcollins" wrote in message ...
It resolves perfectly fine. In fact, I was hoping that doing this, i.e.,
sending an email to the private mailboxes from the user I installed the code
on, might solve the problem (we have a number of these private mailboxes),
but it was inconsistent. It sounds like you don't think this is expected
behavior.

"Sue Mosher [MVP-Outlook]" wrote:

What happens if you type partnerprivate into a message? Does it resolve to an Exchange user there? If not, that's your problem.



"mcollins" wrote in message ...
If the user I am testing this with is in cached exchange mode the code fails
on this line:

Set ofFolder = oMapi.GetSharedDefaultFolder(oRecip, olFolderInbox)

Outlook's error message is to the effect that it could not resolve the
oRecip value. If I take the user out of cached mode, the code works, the
inbox window opens.

I seem to have read somewhere that this is by design and that there might
be a solution using the MAPI_NO_CACHE flag in C++. However, I need a VBA
solution.
--
Michael Collins


"Sue Mosher [MVP-Outlook]" wrote:

Can't what? What symptoms tell you there's a problem? Does oRecip resolve to an Exchange user?

"mcollins" wrote in message ...
I am trying to execute the following code in cached exchange mode in a
workstation installation of Outlook 2003:

Public oMapi As NameSpace
Public ofFolder As MAPIFolder

Sub getPartnerPrivate()
Dim oFolders As Folders
Dim oRecip As Recipient

Set oMapi = Application.GetNamespace("MAPI")
Set oRecip = oMapi.CreateRecipient("partnerprivate")
oRecip.Resolve
Set ofFolder = oMapi.GetSharedDefaultFolder(oRecip, olFolderInbox)
ofFolder.Display
End Sub

Can't. I believe I need to write using Extended MAPI but have no idea.
Would anybody know?
--
Michael Collins


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
when using cached mode, how do i secure my inbox? JohnM Outlook - General Queries 3 June 22nd 07 07:37 PM
Cached Exchange Mode GovAdminGuy Outlook - Installation 1 March 22nd 07 07:55 PM
Cached Exchange Mode Mark_Vader Outlook - Installation 1 December 7th 06 07:06 PM
Using cached exchange mode vs not using cached exchange mode Jim in Cleveland Outlook - Installation 3 September 24th 06 02:47 AM
Cached Exchange Mode Christine Lisi Outlook - Installation 1 August 18th 06 02:21 PM


All times are GMT +1. The time now is 11:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.