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

Accessing Attached MailBoxes



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 24th 08, 11:51 AM posted to microsoft.public.outlook.program_vba
Nigel[_2_]
external usenet poster
 
Posts: 4
Default Accessing Attached MailBoxes

Hi All
I have an account on a corporate mail server; against which I run some rules
and event driven VBA code. All works well.

I recently added a new mailbox (attached mailbox) that I can receive/write
emails etc. Unexpectedly I am unable to run rules or see event triggers in
this mailbox. Is this possible? What do I need to do to switch this on?
Failing that how can I access the contents of this mailbox and it's folders
from VBA code?

Many thanks

--

Regards,
Nigel




  #2  
Old November 24th 08, 03:56 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Accessing Attached MailBoxes

You can only run rules in your default Inbox.

What version of Outlook? In Outlook 2003 and earlier you can use the
NameSpace.Folders collection to find the new mailbox folders by iterating
the Folders collection. In Outlook 2007 you can use the new Stores
collection.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Nigel" wrote in message
...
Hi All
I have an account on a corporate mail server; against which I run some
rules and event driven VBA code. All works well.

I recently added a new mailbox (attached mailbox) that I can receive/write
emails etc. Unexpectedly I am unable to run rules or see event triggers
in this mailbox. Is this possible? What do I need to do to switch this
on?
Failing that how can I access the contents of this mailbox and it's
folders from VBA code?

Many thanks

--

Regards,
Nigel





  #3  
Old November 24th 08, 06:53 PM posted to microsoft.public.outlook.program_vba
Nigel[_2_]
external usenet poster
 
Posts: 4
Default Accessing Attached MailBoxes

Hi Ken
I am using v2003, but will be moving to 2007 soon. So any code will need to
detect version and adapt appropriately.

What I specifically want to do, since I cannot detect the arrival of new
mail in my attached mailbox, is to run some code that does the following...

Finds the folder by name; checks if there is mail items and saves any
attachment to a defined folder on my local system, optionally delete the
mail items from the folder.

Any code to do this gratefully received.

Cheers

--

Regards,
Nigel




"Ken Slovak - [MVP - Outlook]" wrote in message
...
You can only run rules in your default Inbox.

What version of Outlook? In Outlook 2003 and earlier you can use the
NameSpace.Folders collection to find the new mailbox folders by iterating
the Folders collection. In Outlook 2007 you can use the new Stores
collection.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Nigel" wrote in message
...
Hi All
I have an account on a corporate mail server; against which I run some
rules and event driven VBA code. All works well.

I recently added a new mailbox (attached mailbox) that I can
receive/write emails etc. Unexpectedly I am unable to run rules or see
event triggers in this mailbox. Is this possible? What do I need to do
to switch this on?
Failing that how can I access the contents of this mailbox and it's
folders from VBA code?

Many thanks

--

Regards,
Nigel






  #4  
Old November 24th 08, 07:10 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Accessing Attached MailBoxes

You can use the Items.ItemAdd event on any folder, including folders in
delegate mailboxes.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Nigel" wrote in message
...
Hi Ken
I am using v2003, but will be moving to 2007 soon. So any code will need
to detect version and adapt appropriately.

What I specifically want to do, since I cannot detect the arrival of new
mail in my attached mailbox, is to run some code that does the
following...

Finds the folder by name; checks if there is mail items and saves any
attachment to a defined folder on my local system, optionally delete the
mail items from the folder.

Any code to do this gratefully received.

Cheers

--

Regards,
Nigel




"Ken Slovak - [MVP - Outlook]" wrote in message
...
You can only run rules in your default Inbox.

What version of Outlook? In Outlook 2003 and earlier you can use the
NameSpace.Folders collection to find the new mailbox folders by iterating
the Folders collection. In Outlook 2007 you can use the new Stores
collection.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Nigel" wrote in message
...
Hi All
I have an account on a corporate mail server; against which I run some
rules and event driven VBA code. All works well.

I recently added a new mailbox (attached mailbox) that I can
receive/write emails etc. Unexpectedly I am unable to run rules or see
event triggers in this mailbox. Is this possible? What do I need to do
to switch this on?
Failing that how can I access the contents of this mailbox and it's
folders from VBA code?

Many thanks

--

Regards,
Nigel








  #5  
Old November 25th 08, 10:30 AM posted to microsoft.public.outlook.program_vba
Nigel RS
external usenet poster
 
Posts: 16
Default Accessing Attached MailBoxes

Hi Dmitry
How would I use that?

I do not see this event in the ThisOutlookSession class.

Thanks
Nigel


"Dmitry Streblechenko" wrote:

You can use the Items.ItemAdd event on any folder, including folders in
delegate mailboxes.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Nigel" wrote in message
...
Hi Ken
I am using v2003, but will be moving to 2007 soon. So any code will need
to detect version and adapt appropriately.

What I specifically want to do, since I cannot detect the arrival of new
mail in my attached mailbox, is to run some code that does the
following...

Finds the folder by name; checks if there is mail items and saves any
attachment to a defined folder on my local system, optionally delete the
mail items from the folder.

Any code to do this gratefully received.

Cheers

--

Regards,
Nigel




"Ken Slovak - [MVP - Outlook]" wrote in message
...
You can only run rules in your default Inbox.

What version of Outlook? In Outlook 2003 and earlier you can use the
NameSpace.Folders collection to find the new mailbox folders by iterating
the Folders collection. In Outlook 2007 you can use the new Stores
collection.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Nigel" wrote in message
...
Hi All
I have an account on a corporate mail server; against which I run some
rules and event driven VBA code. All works well.

I recently added a new mailbox (attached mailbox) that I can
receive/write emails etc. Unexpectedly I am unable to run rules or see
event triggers in this mailbox. Is this possible? What do I need to do
to switch this on?
Failing that how can I access the contents of this mailbox and it's
folders from VBA code?

Many thanks

--

Regards,
Nigel









  #6  
Old November 25th 08, 06:09 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Accessing Attached MailBoxes

You can do that the same way you handle COM events from any object that
supports it: declare the variable "With Events", provide the event handlers
and make sure the variable stays alive (i.e. it must be a global rather than
local variable).

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Nigel RS" wrote in message
...
Hi Dmitry
How would I use that?

I do not see this event in the ThisOutlookSession class.

Thanks
Nigel


"Dmitry Streblechenko" wrote:

You can use the Items.ItemAdd event on any folder, including folders in
delegate mailboxes.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Nigel" wrote in message
...
Hi Ken
I am using v2003, but will be moving to 2007 soon. So any code will
need
to detect version and adapt appropriately.

What I specifically want to do, since I cannot detect the arrival of
new
mail in my attached mailbox, is to run some code that does the
following...

Finds the folder by name; checks if there is mail items and saves any
attachment to a defined folder on my local system, optionally delete
the
mail items from the folder.

Any code to do this gratefully received.

Cheers

--

Regards,
Nigel




"Ken Slovak - [MVP - Outlook]" wrote in message
...
You can only run rules in your default Inbox.

What version of Outlook? In Outlook 2003 and earlier you can use the
NameSpace.Folders collection to find the new mailbox folders by
iterating
the Folders collection. In Outlook 2007 you can use the new Stores
collection.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Nigel" wrote in message
...
Hi All
I have an account on a corporate mail server; against which I run
some
rules and event driven VBA code. All works well.

I recently added a new mailbox (attached mailbox) that I can
receive/write emails etc. Unexpectedly I am unable to run rules or
see
event triggers in this mailbox. Is this possible? What do I need to
do
to switch this on?
Failing that how can I access the contents of this mailbox and it's
folders from VBA code?

Many thanks

--

Regards,
Nigel











  #7  
Old November 24th 08, 07:28 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Accessing Attached MailBoxes

Check for relevant code samples on www.outlookcode.com.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Nigel" wrote in message
...
Hi Ken
I am using v2003, but will be moving to 2007 soon. So any code will need
to detect version and adapt appropriately.

What I specifically want to do, since I cannot detect the arrival of new
mail in my attached mailbox, is to run some code that does the
following...

Finds the folder by name; checks if there is mail items and saves any
attachment to a defined folder on my local system, optionally delete the
mail items from the folder.

Any code to do this gratefully received.

Cheers

--

Regards,
Nigel


 




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
Navigating to Mailboxes RS Outlook and VBA 1 August 24th 07 10:49 PM
more then 20 mailboxes jd.sunshine77 Outlook - General Queries 3 April 20th 07 06:50 PM
Two mailboxes [email protected] Outlook - General Queries 2 July 14th 06 06:32 PM
Outlook and Accessing Mailboxes PL2 Outlook - Installation 1 May 18th 06 07:35 AM
mailboxes dross2 Outlook - General Queries 1 May 4th 06 05:24 PM


All times are GMT +1. The time now is 08:36 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.