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

Code to Save Email as an .MSG to Directory when Emails Arrive



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 12th 10, 05:51 PM posted to microsoft.public.outlook.program_vba
John
external usenet poster
 
Posts: 382
Default Code to Save Email as an .MSG to Directory when Emails Arrive

I am trying to save all emails that come into the inbox as an .MSG to a
directory on the server. I saw the ability to utilize the SAVEAS method but
have no idea how to implement that to work as emails arrive. Any code help
would be greatly appreciated.

Thanks in advance
John

Ads
  #2  
Old May 13th 10, 12:13 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Code to Save Email as an .MSG to Directory when Emails Arrive



This example requires that the directory exists already:
http://www.vboffice.net/sample.html?...7&cmd=showitem

It works only if Outlook is running while you receive the message.

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Wed, 12 May 2010 08:51:01 -0700 schrieb John:

I am trying to save all emails that come into the inbox as an .MSG to a
directory on the server. I saw the ability to utilize the SAVEAS method

but
have no idea how to implement that to work as emails arrive. Any code

help
would be greatly appreciated.

Thanks in advance
John

  #3  
Old May 13th 10, 04:45 PM posted to microsoft.public.outlook.program_vba
John
external usenet poster
 
Posts: 382
Default Code to Save Email as an .MSG to Directory when Emails Arrive

Hey Michael,

Sounds great...I change the path to a network path does it matter which way
that I put the path should it be hard coded like \\ServerName\Folder or
should it be like P:\Folder is the Drive is mapped on the computer running
outlook. For some reason I am not getting an error message but it is not
putting the file in the folder. When I tried to do it as a test to my
C:\Temp I actually got a permissions error for some reason.

Thanks again for all your help

"Michael Bauer [MVP - Outlook]" wrote:



This example requires that the directory exists already:
http://www.vboffice.net/sample.html?...7&cmd=showitem

It works only if Outlook is running while you receive the message.

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Wed, 12 May 2010 08:51:01 -0700 schrieb John:

I am trying to save all emails that come into the inbox as an .MSG to a
directory on the server. I saw the ability to utilize the SAVEAS method

but
have no idea how to implement that to work as emails arrive. Any code

help
would be greatly appreciated.

Thanks in advance
John

.

  #4  
Old May 13th 10, 06:22 PM posted to microsoft.public.outlook.program_vba
John
external usenet poster
 
Posts: 382
Default Code to Save Email as an .MSG to Directory when Emails Arrive

Hey Michael,

Disregard my message I figured out my error. Thanks so much for you help it
works perfectly.

Have a great one!

John


"John" wrote:

Hey Michael,

Sounds great...I change the path to a network path does it matter which way
that I put the path should it be hard coded like \\ServerName\Folder or
should it be like P:\Folder is the Drive is mapped on the computer running
outlook. For some reason I am not getting an error message but it is not
putting the file in the folder. When I tried to do it as a test to my
C:\Temp I actually got a permissions error for some reason.

Thanks again for all your help

"Michael Bauer [MVP - Outlook]" wrote:



This example requires that the directory exists already:
http://www.vboffice.net/sample.html?...7&cmd=showitem

It works only if Outlook is running while you receive the message.

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Wed, 12 May 2010 08:51:01 -0700 schrieb John:

I am trying to save all emails that come into the inbox as an .MSG to a
directory on the server. I saw the ability to utilize the SAVEAS method

but
have no idea how to implement that to work as emails arrive. Any code

help
would be greatly appreciated.

Thanks in advance
John

.

  #5  
Old May 20th 10, 07:29 PM posted to microsoft.public.outlook.program_vba
Chris
external usenet poster
 
Posts: 280
Default Code to Save Email as an .MSG to Directory when Emails Arrive

John,

What was your error. I too am not getting anything saved to the file.

Chris

"John" wrote:

Hey Michael,

Disregard my message I figured out my error. Thanks so much for you help it
works perfectly.

Have a great one!

John


"John" wrote:

Hey Michael,

Sounds great...I change the path to a network path does it matter which way
that I put the path should it be hard coded like \\ServerName\Folder or
should it be like P:\Folder is the Drive is mapped on the computer running
outlook. For some reason I am not getting an error message but it is not
putting the file in the folder. When I tried to do it as a test to my
C:\Temp I actually got a permissions error for some reason.

Thanks again for all your help

"Michael Bauer [MVP - Outlook]" wrote:



This example requires that the directory exists already:
http://www.vboffice.net/sample.html?...7&cmd=showitem

It works only if Outlook is running while you receive the message.

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Wed, 12 May 2010 08:51:01 -0700 schrieb John:

I am trying to save all emails that come into the inbox as an .MSG to a
directory on the server. I saw the ability to utilize the SAVEAS method
but
have no idea how to implement that to work as emails arrive. Any code
help
would be greatly appreciated.

Thanks in advance
John
.

 




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
Save Email as .msg File with Code Peter Hibbs Outlook and VBA 5 August 10th 09 05:08 PM
Macro or Code to save email as RTF files Brent E Outlook and VBA 2 February 4th 09 03:10 PM
Some emails arrive, others don't Rob graham Outlook - General Queries 6 June 19th 08 07:48 PM
Attachments will not open for the recipient. They arrive in code. einekleinejazz Outlook - Installation 1 March 14th 07 06:42 PM
My Sent Emails Dont Arrive??? Alan Considine Outlook Express 7 April 12th 06 06:03 AM


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