Hi Johnny,
I don't know if there's a change in the behaviour of a newer version. But
obviously, what you see is that the e-mail gets saved with the changes you
make. So, one quick workaround might be to create a copy of the e-mail, save
it without some attachments as a file, and then delete it from Outlook (if
necessary).
Best regards
Michael Bauer - MVP Outlook
: VBOffice Reporter for Data Analysis & Reporting
: Outlook Categories? Category Manager Is Your Tool:
: <http://www.vboffice.net/product.html?pub=6&lang=en>
Am Mon, 16 Jun 2008 07:31:38 +0200 schrieb Johnny E. Jensen:
> Hello Michael
>
> Set Item = olNamespace.GetItemFromID(Entryid)
> Filename = CreateFilename(".MSG")
> For i = frmAttachEmail.lstAttachment.ListCount - 1 To 0 Step -1
> If Not frmAttachEmail.lstAttachment.Selected(i) Then
> Item.Attachments.Item(i + 1).Delete
> End If
> Next i
> Item.SaveAs Filename, olMSG
>
> I am aware that the code deletes the un-selected attachments, but this
code
> have been working for years.And the deleation should never affect the
> mailitem within Outlook because a Save is never raised.
>
> Kind regards
> Johnny E. Jensen
>
>
> "Michael Bauer [MVP - Outlook]" <mb@mvps.org> wrote in message
> news:cu538i8d9m1d$.h221mrtkxbmj.dlg@40tude.net...
>>
>>
>> What's your code?
>>
>> --
>> Best regards
>> Michael Bauer - MVP Outlook
>>
>> : VBOffice Reporter for Data Analysis & Reporting
>> : Outlook Categories? Category Manager Is Your Tool:
>> : <http://www.vboffice.net/product.html?pub=6&lang=en>
>>
>>
>> Am Sat, 14 Jun 2008 21:57:20 +0200 schrieb Johnny E. Jensen:
>>
>>> Hello NG
>>>
>>> I have developet an application that takes an Outlook mailitem from any
>>> given folder an save it to any given location as a MSG file. User can
>> deside
>>> to include all or several attachments within the MSG file.
>>>
>>> Now if the mailitem is NOT shown in the Outlook reading pane or in any
>>> Outlook form all works just fine.
>>> Lets say that a mailitem holds 3 attachments a1, a2 and a3 and the user
>>> wants to include only attachment a1, and the mailitem i shown in Outlook
>>> reading pane or any Outlook form. Then the application makes the MSG
>>> file,
>>> now this strange thing happens: the attachments a2 and a3 is no longer
>>> within the mailitem any more.
>>>
>>> Does Outlook makes an mailitem "ready" for updates when shown in reading
>>> pane? and furthermore can I do something to prevent this to happen.
>>>
>>> Kind regards
>>>
>>> Johnny E. Jensen