Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Importing .msg files into a .pst file (http://www.outlookbanter.com/outlook-vba/25864-importing-msg-files-into-pst.html)

Stever September 2nd 06 01:14 AM

Importing .msg files into a .pst file
 
A bunch of people at our company have been saving their emails to the
network drives by draging them from outlook 2003 to the file system. The
problem is that when you do this you loose the intelligence of the messages
when it comes to finding one email among thousands. What I have been tasked
to do is reverse this by creating a .pst file for each of our projects(which
I have already done there are 1500 of them by the way) and importing the
..msg files into the .pst file they belong to. The only way I can do this by
manually draging the files from the network drive into the folder in
Outlook. I can't seem to find a way to use vba to do this in an automated
manner.

So the goal is:

Search each folder in g:\projects for *.msg files.
When a folder contains *.msg files, Open the FOLDERNAME.pst file in outlook
ie. c:\projects\12345_01.pst and copy the .msg files into the newly opened
..pst file.

Any suggestions?

Thanks

Steve




Michael Bauer [MVP - Outlook] September 4th 06 06:42 AM

Importing .msg files into a .pst file
 
Am Fri, 1 Sep 2006 17:14:14 -0600 schrieb Stever:

For searching the files you could use the FileSystemObject of the Microsoft
Scripting Runtime.

CreateItemFromTemplate you can import a *.msg file but then you loose all
sender related properties. Instead I'd use GetMessageFromMsgFile with
Redemption (www.dimastr.com).

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


A bunch of people at our company have been saving their emails to the
network drives by draging them from outlook 2003 to the file system. The
problem is that when you do this you loose the intelligence of the

messages
when it comes to finding one email among thousands. What I have been

tasked
to do is reverse this by creating a .pst file for each of our

projects(which
I have already done there are 1500 of them by the way) and importing the
.msg files into the .pst file they belong to. The only way I can do this

by
manually draging the files from the network drive into the folder in
Outlook. I can't seem to find a way to use vba to do this in an automated
manner.

So the goal is:

Search each folder in g:\projects for *.msg files.
When a folder contains *.msg files, Open the FOLDERNAME.pst file in

outlook
ie. c:\projects\12345_01.pst and copy the .msg files into the newly opened
.pst file.

Any suggestions?

Thanks

Steve


Dmitry Streblechenko September 4th 06 11:05 PM

Importing .msg files into a .pst file
 
Or use Safe*Item/RDOMail.Import(..., olMSG) in Redemption to import an MSG
file into an existing (or a newly created) message residing in any store.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Michael Bauer [MVP - Outlook]" wrote in message
...
Am Fri, 1 Sep 2006 17:14:14 -0600 schrieb Stever:

For searching the files you could use the FileSystemObject of the
Microsoft
Scripting Runtime.

CreateItemFromTemplate you can import a *.msg file but then you loose all
sender related properties. Instead I'd use GetMessageFromMsgFile with
Redemption (www.dimastr.com).

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


A bunch of people at our company have been saving their emails to the
network drives by draging them from outlook 2003 to the file system. The
problem is that when you do this you loose the intelligence of the

messages
when it comes to finding one email among thousands. What I have been

tasked
to do is reverse this by creating a .pst file for each of our

projects(which
I have already done there are 1500 of them by the way) and importing the
.msg files into the .pst file they belong to. The only way I can do this

by
manually draging the files from the network drive into the folder in
Outlook. I can't seem to find a way to use vba to do this in an automated
manner.

So the goal is:

Search each folder in g:\projects for *.msg files.
When a folder contains *.msg files, Open the FOLDERNAME.pst file in

outlook
ie. c:\projects\12345_01.pst and copy the .msg files into the newly
opened
.pst file.

Any suggestions?

Thanks

Steve





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