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

How to copy attachment .msg into folder ?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 21st 06, 02:57 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 2
Default How to copy attachment .msg into folder ?

Please, could you give me a tip how to make the following task by
program in VBA for Outlook?

I have a message (MSG0) in my inbox folder. This message has some
attachments of type embedded message (MSG1[, MSG2,...]).
I would like to make by the program the same as if I take the icon of
the embedded message MSG1 in the open MSG0 by mouse, drag it and drop
into my inbox folder.


For i = 1 To mItem.Attachments.Count
finam = mItem.Attachments.Item(i).FileName
If mItem.Attachments.Item(i).Type = olEmbeddeditem _
And Right(finam, 4) = ".msg" Then
.................
????????????
.................
End If
Next i

Ads
  #2  
Old February 21st 06, 05:08 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to copy attachment .msg into folder ?

Use Attachment.SaveAsFile - it will save the embedded messages in the MSG
format.

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

wrote in message
ups.com...
Please, could you give me a tip how to make the following task by
program in VBA for Outlook?

I have a message (MSG0) in my inbox folder. This message has some
attachments of type embedded message (MSG1[, MSG2,...]).
I would like to make by the program the same as if I take the icon of
the embedded message MSG1 in the open MSG0 by mouse, drag it and drop
into my inbox folder.


For i = 1 To mItem.Attachments.Count
finam = mItem.Attachments.Item(i).FileName
If mItem.Attachments.Item(i).Type = olEmbeddeditem _
And Right(finam, 4) = ".msg" Then
.................
????????????
.................
End If
Next i



  #3  
Old February 22nd 06, 01:17 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 2
Default How to copy attachment .msg into folder ?

It is OK for writing as file, but not into inbox as message.I got
onother perfect idea from Sue Mosher: The code sample at
http://www.outlookcode.com/codedetail.aspx?id=523 shows how to use the
Redemption library to import embedded messages into Outlook. THere is
no pure Outlook object model way to do this.
Thank you for your answer.
P. Zámek

 




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
"Unable to Display the Folder" msg, can't delete folder Yvonne Outlook - Calandaring 2 March 29th 06 08:01 PM
Cannot copy this folder as it may contain private items carlstev Outlook - General Queries 2 March 9th 06 10:03 PM
Send an email copy to folder [email protected] Outlook - General Queries 3 February 16th 06 02:44 PM
copy a record to another folder Bobbi Z Outlook - Using Contacts 3 February 10th 06 08:45 PM
Copy useful news to local folder kei Outlook Express 3 January 21st 06 12:37 AM


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