Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Calendaring / January 2004

Tip: Looking for answers? Try searching our database.

VBScript - Return name of mailbox - Outlook 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dwight Nelson - 22 Jan 2004 00:59 GMT
I would like to use VBScript to return the name of an
Exchange Mailbox with in an Appointment Item Form.  I am
trying to assign the item.location field with the name of
the mailbox which is a member of the "other calendar"
section of outlook.  The property I'm trying to return is
the caption of the sub-explorer right above where a
calendar is displayed.  For example:  if I have my
personal exchange calendar open and have another user's
calendar open side-by-side, there is a caption above each
calendar.  My calendar's caption is just "calendar".  
However the other user's calendar is listed as the
mailbox name or the other user's name.  Does anybody know
how to return this caption?

By the way, I have used the following code in Outlook
2002 with success since the other users calendar opened
in a new window.

Item.location = Application.ActiveExplorer.Caption

However in 2003, the caption is of the overall outlook
window.

Thanks,
Dwight Nelson
Sue Mosher [MVP] - 22 Jan 2004 02:12 GMT
Instead of using the caption, have you tried to extract the mailbox name
from the FolderPath property?

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> I would like to use VBScript to return the name of an
> Exchange Mailbox with in an Appointment Item Form.  I am
[quoted text clipped - 21 lines]
> Thanks,
> Dwight Nelson
Dwight Nelson - 22 Jan 2004 04:55 GMT
Thanks for the quick reply.  I just tried the folderpath
property per your suggestion.  If I'm on my own calendar
I get a path of "\\Mailbox - Dwight Nelson\Calendar".  
However when I am working with another user's mailbox the
path is "\\\Calendar".  Seems the mailbox info is missing.

Any other ideas?

Thanks again,
Dwight Nelson
>-----Original Message-----
>Instead of using the caption, have you tried to extract the mailbox name
[quoted text clipped - 27 lines]
>
>.
Sue Mosher [MVP] - 22 Jan 2004 12:47 GMT
So these are not folders from other mailboxes visible in the folder list?
I'd probaby try using the Organizer property for the items in the calendar
folder, although that could be misleading if the mailbox owner has a
delegate. It will also trigger security prompts.

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Thanks for the quick reply.  I just tried the folderpath
> property per your suggestion.  If I'm on my own calendar
[quoted text clipped - 10 lines]
> the mailbox name
> >from the FolderPath property?

> >"Dwight Nelson" <dwightn@casaschurch.org> wrote in
> message
[quoted text clipped - 31 lines]
> >
> >.
Dwight Nelson - 22 Jan 2004 20:17 GMT
The Organizer property won't work for these events since
the calendar is not opened up the a MAPI profile
referencing the same calendar.  The calendars do not have
enabled userids since they are being used as a resource
calendar only (room scheduling).  These resource
calendars also "invite" master resource calendars which
need the location field filled in; that is why I want to
make this automatic with the mailbox name for the subject
calendar.  Clear right?  Sorry for all of the detail.

Thanks,
Dwight (by now we are on a first name basis)
>-----Original Message-----
>So these are not folders from other mailboxes visible in the folder list?
[quoted text clipped - 54 lines]
>
>.
Dwight Nelson - 22 Jan 2004 20:30 GMT
Correction:  the organizer name is not active until after
the item is sent so it cannot be used to fill in the
location field.

thanks,
Dwight
>-----Original Message-----
>So these are not folders from other mailboxes visible in the folder list?
[quoted text clipped - 54 lines]
>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.