![]() |
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 |
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 |
All times are GMT +1. The time now is 10:35 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-2006 OutlookBanter.com