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

Saving email messages with path



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 31st 06, 04:53 PM posted to microsoft.public.outlook.program_vba
Catalin
external usenet poster
 
Posts: 15
Default Saving email messages with path

Hello everybody,

I run OL2003, I have 3 POP3 email accounts with 3 .pst files one for each
account.

Please help me with the following problem: I would like to save the messages
and with the path from the .pst files. For example:
the message - Work2006\Inbox\Sales\offer123 which is stored inside the file
Work2006.pst to be able to save it (including the path) to My Documents
folder like ..... My documentsWork2006\Inbox\Sales\offer123.msg.

Pls keep in mind that the folders does not exist inside My Documents and
should be created by VBA.

I have tried something but I have difficulties getting the folders and
subfolders of the .pst file.

There is another problem I have faced when I tried to save the messages:
When encounter a report (read receipt) object (not a mail object) sometimes
it saves it and sometimes no. I do not understand why ...

A helping hand will be very appreciated.
Thanks in advance.

Catalin
  #2  
Old November 1st 06, 06:53 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Saving email messages with path

Am Tue, 31 Oct 2006 07:53:01 -0800 schrieb Catalin:

For the path you can get each itemīs Parent.FolderPath property, whcih
returns the folderīs path. That result starts with two back slashes, strip
out th efirst one with:

Dim Path as string
Dim Item as Outlook.MailItem

... getting the item
Path=Item.Parent.FolderPath
Path=Mid$(Path, 2)

For creating the path you can add a reference (Tools/References) to the
Microsoft Scripting Runtime, then use its FileSystemObject.CreateFolder
function.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Hello everybody,

I run OL2003, I have 3 POP3 email accounts with 3 .pst files one for each
account.

Please help me with the following problem: I would like to save the

messages
and with the path from the .pst files. For example:
the message - Work2006\Inbox\Sales\offer123 which is stored inside the

file
Work2006.pst to be able to save it (including the path) to My Documents
folder like ..... My documentsWork2006\Inbox\Sales\offer123.msg.

Pls keep in mind that the folders does not exist inside My Documents and
should be created by VBA.

I have tried something but I have difficulties getting the folders and
subfolders of the .pst file.

There is another problem I have faced when I tried to save the messages:
When encounter a report (read receipt) object (not a mail object)

sometimes
it saves it and sometimes no. I do not understand why ...

A helping hand will be very appreciated.
Thanks in advance.

Catalin

 




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
Path to Messages rogeepete Outlook Express 7 October 10th 06 10:54 PM
change the cache mode path (.ost file path) bln-ami Outlook - Installation 0 July 18th 06 09:45 AM
Saving Messages grinder Outlook Express 1 May 30th 06 06:12 PM
Two questions on saving sent messages Paul M Outlook - General Queries 7 May 26th 06 05:25 PM
Reading messages and saving in word? Stan Mulder Outlook and VBA 0 February 25th 06 04:27 PM


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