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

Display all items in outlook 2003 folder



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 17th 07, 07:17 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 5
Default Display all items in outlook 2003 folder

Hi VBA Friends,

I am trying in VBA to select an already created folder "createdFolder"
which has mail items in it.

What I want to do is reference the "createdFolder" and display all the
mail items contained within it, using a for each or a do until

There are numerous posts which I have been looking at and I think what
I need to do is reference the "createdFolder" using GetNamespace
method?

Can anyone help please??

Many thanks

Scott Spence

Ads
  #2  
Old July 17th 07, 09:38 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Display all items in outlook 2003 folder

If you know the location of the folder, you can access it fairly easily in
reference to a default folder:

Set myFolder = objInbox.Folders("MY SUBFOLDER")

Use the NameSpace.GetDefaultFolder method to return various default folders.

If you don't know the location, one way is to iterate through all of the
folders:

http://www.outlookcode.com/codedetail.aspx?id=1639

You can display a specific folder using the Explorer.CurrentFolder property
or the Explorer.SelectFolder method. You don't need to loop through
individual items in a folder to display it - they'll all display
automatically based on the last selected (or the default) View.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


" wrote:

Hi VBA Friends,

I am trying in VBA to select an already created folder "createdFolder"
which has mail items in it.

What I want to do is reference the "createdFolder" and display all the
mail items contained within it, using a for each or a do until

There are numerous posts which I have been looking at and I think what
I need to do is reference the "createdFolder" using GetNamespace
method?

Can anyone help please??

Many thanks

Scott Spence


  #3  
Old July 19th 07, 09:14 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 5
Default Display all items in outlook 2003 folder

Hi Eric,

Thanks for getting back to me, I am really struggling with qualifying
the objects.

I know what the folder name is, I found a really useful piece of code
that moves all the items from the drafts folder to an outbox subfolder
that creates the subfolder if it is not detected and moves all the
draft items into it.

The thing is that I want to open/display all the items that have been
moved to this folder.

Can you tell me what "myFolder" and "objInbox" have been defined in
memory as?



Eric Legault [ MVP - Outlook ] wrote:
If you know the location of the folder, you can access it fairly easily in
reference to a default folder:

Set myFolder = objInbox.Folders("MY SUBFOLDER")

Use the NameSpace.GetDefaultFolder method to return various default folders.

If you don't know the location, one way is to iterate through all of the
folders:

http://www.outlookcode.com/codedetail.aspx?id=1639

You can display a specific folder using the Explorer.CurrentFolder property
or the Explorer.SelectFolder method. You don't need to loop through
individual items in a folder to display it - they'll all display
automatically based on the last selected (or the default) View.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


" wrote:

Hi VBA Friends,

I am trying in VBA to select an already created folder "createdFolder"
which has mail items in it.

What I want to do is reference the "createdFolder" and display all the
mail items contained within it, using a for each or a do until

There are numerous posts which I have been looking at and I think what
I need to do is reference the "createdFolder" using GetNamespace
method?

Can anyone help please??

Many thanks

Scott Spence



  #4  
Old July 19th 07, 09:16 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 5
Default Display all items in outlook 2003 folder

Hi Eric,

Thanks for getting back to me, I am really struggling with qualifying
the objects.

I know what the folder name is, I found a really useful piece of code
that moves all the items from the drafts folder to an outbox subfolder
that creates the subfolder if it is not detected and moves all the
draft items into it.

The thing is that I want to open/display all the items that have been
moved to this folder.

Can you tell me what "myFolder" and "objInbox" have been defined in
memory as?

Scott

Eric Legault [ MVP - Outlook ] wrote:
If you know the location of the folder, you can access it fairly easily in
reference to a default folder:

Set myFolder = objInbox.Folders("MY SUBFOLDER")

Use the NameSpace.GetDefaultFolder method to return various default folders.

If you don't know the location, one way is to iterate through all of the
folders:

http://www.outlookcode.com/codedetail.aspx?id=1639

You can display a specific folder using the Explorer.CurrentFolder property
or the Explorer.SelectFolder method. You don't need to loop through
individual items in a folder to display it - they'll all display
automatically based on the last selected (or the default) View.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


" wrote:

Hi VBA Friends,

I am trying in VBA to select an already created folder "createdFolder"
which has mail items in it.

What I want to do is reference the "createdFolder" and display all the
mail items contained within it, using a for each or a do until

There are numerous posts which I have been looking at and I think what
I need to do is reference the "createdFolder" using GetNamespace
method?

Can anyone help please??

Many thanks

Scott Spence



  #5  
Old July 19th 07, 04:12 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Display all items in outlook 2003 folder

Those variables are declared as Outlook.MAPIFolder objects. Always make sure
you check the Outlook VBA help file - it's full of helpful code samples.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


" wrote:

Hi Eric,

Thanks for getting back to me, I am really struggling with qualifying
the objects.

I know what the folder name is, I found a really useful piece of code
that moves all the items from the drafts folder to an outbox subfolder
that creates the subfolder if it is not detected and moves all the
draft items into it.

The thing is that I want to open/display all the items that have been
moved to this folder.

Can you tell me what "myFolder" and "objInbox" have been defined in
memory as?



Eric Legault [ MVP - Outlook ] wrote:
If you know the location of the folder, you can access it fairly easily in
reference to a default folder:

Set myFolder = objInbox.Folders("MY SUBFOLDER")

Use the NameSpace.GetDefaultFolder method to return various default folders.

If you don't know the location, one way is to iterate through all of the
folders:

http://www.outlookcode.com/codedetail.aspx?id=1639

You can display a specific folder using the Explorer.CurrentFolder property
or the Explorer.SelectFolder method. You don't need to loop through
individual items in a folder to display it - they'll all display
automatically based on the last selected (or the default) View.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


" wrote:

Hi VBA Friends,

I am trying in VBA to select an already created folder "createdFolder"
which has mail items in it.

What I want to do is reference the "createdFolder" and display all the
mail items contained within it, using a for each or a do until

There are numerous posts which I have been looking at and I think what
I need to do is reference the "createdFolder" using GetNamespace
method?

Can anyone help please??

Many thanks

Scott Spence




  #6  
Old July 19th 07, 07:16 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Display all items in outlook 2003 folder

Hi Gary. See my blog for a walkthrough on wiring up Outlook to handle e-mail
events:

Eric Legault My Eggo : Getting a Handle on Your E-mails with VBA:
http://blogs.officezealot.com/legault/pages/20086.aspx

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


" wrote:

Hi Eric,

Thanks for getting back to me, I am really struggling with qualifying
the objects.

I know what the folder name is, I found a really useful piece of code
that moves all the items from the drafts folder to an outbox subfolder
that creates the subfolder if it is not detected and moves all the
draft items into it.

The thing is that I want to open/display all the items that have been
moved to this folder.

Can you tell me what "myFolder" and "objInbox" have been defined in
memory as?



Eric Legault [ MVP - Outlook ] wrote:
If you know the location of the folder, you can access it fairly easily in
reference to a default folder:

Set myFolder = objInbox.Folders("MY SUBFOLDER")

Use the NameSpace.GetDefaultFolder method to return various default folders.

If you don't know the location, one way is to iterate through all of the
folders:

http://www.outlookcode.com/codedetail.aspx?id=1639

You can display a specific folder using the Explorer.CurrentFolder property
or the Explorer.SelectFolder method. You don't need to loop through
individual items in a folder to display it - they'll all display
automatically based on the last selected (or the default) View.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


" wrote:

Hi VBA Friends,

I am trying in VBA to select an already created folder "createdFolder"
which has mail items in it.

What I want to do is reference the "createdFolder" and display all the
mail items contained within it, using a for each or a do until

There are numerous posts which I have been looking at and I think what
I need to do is reference the "createdFolder" using GetNamespace
method?

Can anyone help please??

Many thanks

Scott Spence




 




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
Outlook 2003 Script: How to get the Index or number of items in a Folder news.microsoft.com Outlook and VBA 5 November 6th 06 10:11 PM
Sent Items"Unable to display the folder" [email protected] Outlook - General Queries 5 October 4th 06 02:19 PM
How to update sent items on IMAP Folder on server using Outlook 2003 ? Luqman Outlook - General Queries 0 September 4th 06 09:42 PM
how to retain 10 days items in Outlook 2003 deleted items folder? Balthazar Outlook - Installation 2 June 7th 06 04:05 PM
Display Recvd and Sent Items in Same folder? Phill Outlook - Using Contacts 1 June 6th 06 10:11 PM


All times are GMT +1. The time now is 06:56 AM.


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.