<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
		<id>https://www.devtal.de/w/index.php?action=history&amp;feed=atom&amp;title=Benutzer%3ARdiez%2FOutlookAttachmentRemover</id>
		<title>Benutzer:Rdiez/OutlookAttachmentRemover - Versionsgeschichte</title>
		<link rel="self" type="application/atom+xml" href="https://www.devtal.de/w/index.php?action=history&amp;feed=atom&amp;title=Benutzer%3ARdiez%2FOutlookAttachmentRemover"/>
		<link rel="alternate" type="text/html" href="https://www.devtal.de/w/index.php?title=Benutzer:Rdiez/OutlookAttachmentRemover&amp;action=history"/>
		<updated>2026-04-30T06:47:17Z</updated>
		<subtitle>Versionsgeschichte dieser Seite in /dev/tal</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://www.devtal.de/w/index.php?title=Benutzer:Rdiez/OutlookAttachmentRemover&amp;diff=3146&amp;oldid=prev</id>
		<title>Rdiez: Weiterleitung nach Benutzer:Rdiez/PageRemoved erstellt</title>
		<link rel="alternate" type="text/html" href="https://www.devtal.de/w/index.php?title=Benutzer:Rdiez/OutlookAttachmentRemover&amp;diff=3146&amp;oldid=prev"/>
				<updated>2015-05-15T19:06:03Z</updated>
		
		<summary type="html">&lt;p&gt;Weiterleitung nach &lt;a href=&quot;/wiki/Benutzer:Rdiez/PageRemoved&quot; title=&quot;Benutzer:Rdiez/PageRemoved&quot;&gt;Benutzer:Rdiez/PageRemoved&lt;/a&gt; erstellt&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='de'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Version vom 15. Mai 2015, 19:06 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{BenutzerSeitenNichtVeraendernWarnung|rdiez}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#REDIRECT [[Benutzer:Rdiez/PageRemoved]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#REDIRECT [[Benutzer:Rdiez/PageRemoved]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rdiez</name></author>	</entry>

	<entry>
		<id>https://www.devtal.de/w/index.php?title=Benutzer:Rdiez/OutlookAttachmentRemover&amp;diff=3145&amp;oldid=prev</id>
		<title>Rdiez: Der Seiteninhalt wurde durch einen anderen Text ersetzt: „{{BenutzerSeitenNichtVeraendernWarnung|rdiez}}  #REDIRECT Benutzer:Rdiez/PageRemoved“</title>
		<link rel="alternate" type="text/html" href="https://www.devtal.de/w/index.php?title=Benutzer:Rdiez/OutlookAttachmentRemover&amp;diff=3145&amp;oldid=prev"/>
				<updated>2015-05-15T19:05:38Z</updated>
		
		<summary type="html">&lt;p&gt;Der Seiteninhalt wurde durch einen anderen Text ersetzt: „{{BenutzerSeitenNichtVeraendernWarnung|rdiez}}  #REDIRECT &lt;a href=&quot;/wiki/Benutzer:Rdiez/PageRemoved&quot; title=&quot;Benutzer:Rdiez/PageRemoved&quot;&gt;Benutzer:Rdiez/PageRemoved&lt;/a&gt;“&lt;/p&gt;
&lt;a href=&quot;https://www.devtal.de/w/index.php?title=Benutzer:Rdiez/OutlookAttachmentRemover&amp;amp;diff=3145&amp;amp;oldid=2210&quot;&gt;Änderungen zeigen&lt;/a&gt;</summary>
		<author><name>Rdiez</name></author>	</entry>

	<entry>
		<id>https://www.devtal.de/w/index.php?title=Benutzer:Rdiez/OutlookAttachmentRemover&amp;diff=2210&amp;oldid=prev</id>
		<title>Rdiez am 8. November 2013 um 19:23 Uhr</title>
		<link rel="alternate" type="text/html" href="https://www.devtal.de/w/index.php?title=Benutzer:Rdiez/OutlookAttachmentRemover&amp;diff=2210&amp;oldid=prev"/>
				<updated>2013-11-08T19:23:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='de'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Version vom 8. November 2013, 19:23 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{BenutzerSeitenNichtVeraendernWarnung|rdiez}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{BenutzerSeitenNichtVeraendernWarnung|rdiez}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= Microsoft Outlook: Automatically add an &amp;quot;[Attachment deleted: filename.ext]&amp;quot; note when removing e-mail attachments =&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you are using Microsoft Outlook, chances are that you are in a corporation and your mailbox has a limited size.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you are using Microsoft Outlook, chances are that you are in a corporation and your mailbox has a limited size.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rdiez</name></author>	</entry>

	<entry>
		<id>https://www.devtal.de/w/index.php?title=Benutzer:Rdiez/OutlookAttachmentRemover&amp;diff=2209&amp;oldid=prev</id>
		<title>Rdiez: Die Seite wurde neu angelegt: „{{BenutzerSeitenNichtVeraendernWarnung|rdiez}}  If you are using Microsoft Outlook, chances are that you are in a corporation and your mailbox has a limited size.…“</title>
		<link rel="alternate" type="text/html" href="https://www.devtal.de/w/index.php?title=Benutzer:Rdiez/OutlookAttachmentRemover&amp;diff=2209&amp;oldid=prev"/>
				<updated>2013-11-08T19:22:13Z</updated>
		
		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „{{BenutzerSeitenNichtVeraendernWarnung|rdiez}}  If you are using Microsoft Outlook, chances are that you are in a corporation and your mailbox has a limited size.…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{BenutzerSeitenNichtVeraendernWarnung|rdiez}}&lt;br /&gt;
&lt;br /&gt;
If you are using Microsoft Outlook, chances are that you are in a corporation and your mailbox has a limited size.&lt;br /&gt;
Therefore, you need to delete e-mails often, or at least the biggest file attachments.&lt;br /&gt;
&lt;br /&gt;
In Mozilla Thunderbird, when you delete an e-mail attachment, the e-mail still remembers the attachment's filename,&lt;br /&gt;
so that you know that an attachment was there in the past. However, in Microsoft Outlook, if you delete an attachment, it's gone without trace. Later on, you don't know&lt;br /&gt;
if an e-mail ever had an attachment, or who sent you a particular file.&lt;br /&gt;
&lt;br /&gt;
This script emulates Thunderbird's behaviour in Outlook. Usage scenarios are:&lt;br /&gt;
&lt;br /&gt;
# You open an e-mail, press the button associated to this script, and then attachments are gone, but text lines like the following are automatically prepended to the e-mail: &amp;lt;br/&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;[Attachment deleted: myfile1.zip] &amp;lt;br/&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;[Attachment deleted: myfile2.zip] &amp;lt;br/&amp;gt; The e-mail is marked as modified but not automatically saved. You can then discard changes and get your attachments back if you wish. &amp;lt;br/&amp;gt; This is the scenario I had in mind when I wrote this script.&lt;br /&gt;
# You can also mark several e-mails without opening them and do the same as for case (1).&amp;lt;br/&amp;gt; If there is more than one e-mail, you'll get a confirmation dialog box. &amp;lt;br/&amp;gt; There are 2 different ways to approach this task:&lt;br /&gt;
## You don't open the e-mails. &amp;lt;br/&amp;gt; The script would need to save changes immediately. Otherwise, all changes will be lost without confirmation when you close Outlook. I chose not do to this, because it's risky, the user can lose important data.&lt;br /&gt;
## Open all e-mails and modify them. &amp;lt;br/&amp;gt; This is similar to scenario (1), but may leave behind many open e-mails. Every time the user tries to close one, he'll be prompt in ordre to save or discard the changes. This is the option I chose to implement.&lt;br /&gt;
&lt;br /&gt;
It would have been better to decide between (1) and (2.2) based on whether the user has selected e-mails&lt;br /&gt;
on a list, or whether the user has opened a single e-mail. However, I don't know how to distinguish those scenarios yet in VBA code.&lt;br /&gt;
&lt;br /&gt;
This script has been tested with Outlook 2010.&lt;br /&gt;
&lt;br /&gt;
In order to install this script in your Outloook, you need to enable the developer tools ribbon, copy the source code&lt;br /&gt;
below to the default project, and then create a ribbon icon for it on all the ribbons you would like to access this script from.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Public Sub DeleteAttachmentsButLeaveTheirFilenamesBehind()&lt;br /&gt;
&lt;br /&gt;
    On Error GoTo ErrorHandler:&lt;br /&gt;
&lt;br /&gt;
    Dim objOL As Outlook.Application&lt;br /&gt;
    Set objOL = CreateObject(&amp;quot;Outlook.Application&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    Dim objSelection As Outlook.Selection&lt;br /&gt;
    Set objSelection = objOL.ActiveExplorer.Selection&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
   ' In the first pass, we just count the number of attachments to delete,&lt;br /&gt;
   ' in order to ask for confirmation if necessary.&lt;br /&gt;
&lt;br /&gt;
    Dim emailCount As Integer&lt;br /&gt;
    Dim attachmentCount As Integer&lt;br /&gt;
    Dim objMsg1 As MailItem&lt;br /&gt;
&lt;br /&gt;
    For Each objMsg1 In objSelection&lt;br /&gt;
        If objMsg1.Class = olMail Then&lt;br /&gt;
        &lt;br /&gt;
            emailCount = emailCount + 1&lt;br /&gt;
        &lt;br /&gt;
            Dim objAttachments1 As Outlook.Attachments&lt;br /&gt;
            Set objAttachments1 = objMsg1.Attachments&lt;br /&gt;
            &lt;br /&gt;
            Dim msgAttachmentCount1 As Long&lt;br /&gt;
            msgAttachmentCount1 = objAttachments1.Count&lt;br /&gt;
            &lt;br /&gt;
            attachmentCount = attachmentCount + objAttachments1.Count&lt;br /&gt;
        End If&lt;br /&gt;
    Next&lt;br /&gt;
    &lt;br /&gt;
    Dim msgboxRes As VbMsgBoxResult&lt;br /&gt;
    &lt;br /&gt;
    If emailCount = 0 Then&lt;br /&gt;
      msgboxRes = MsgBox(&amp;quot;No e-mails selected.&amp;quot;, vbOKOnly + vbCritical)&lt;br /&gt;
      Exit Sub&lt;br /&gt;
    End If&lt;br /&gt;
    &lt;br /&gt;
    If attachmentCount = 0 Then&lt;br /&gt;
      msgboxRes = MsgBox(&amp;quot;No attachments found in &amp;quot; &amp;amp; emailCount &amp;amp; &amp;quot; e-mail(s).&amp;quot;, vbOKOnly + vbCritical)&lt;br /&gt;
      Exit Sub&lt;br /&gt;
    End If&lt;br /&gt;
    &lt;br /&gt;
    If emailCount &amp;gt; 1 Then&lt;br /&gt;
      msgboxRes = MsgBox(&amp;quot;Would you like to remove &amp;quot; &amp;amp; attachmentCount &amp;amp; &amp;quot; attachment(s) from &amp;quot; &amp;amp; emailCount &amp;amp; &amp;quot; e-mail(s)?&amp;quot;, vbYesNo + vbQuestion + vbDefaultButton2)&lt;br /&gt;
      If msgboxRes = vbNo Then&lt;br /&gt;
          Exit Sub&lt;br /&gt;
      End If&lt;br /&gt;
    End If&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    ' In the second pass, we remove the attachments. Note that the e-mails could have changed in the meantime.&lt;br /&gt;
    ' However, it's rare to hit that window of opportunity.&lt;br /&gt;
    &lt;br /&gt;
    Dim deletedMsg As String&lt;br /&gt;
    Dim objMsg2 As MailItem&lt;br /&gt;
&lt;br /&gt;
    For Each objMsg2 In objSelection&lt;br /&gt;
        If objMsg2.Class = olMail Then&lt;br /&gt;
        &lt;br /&gt;
            ' Open all e-mails we are going to change. Otherwise, if the user closes Outlook, any changes will be discarded.&lt;br /&gt;
            ' See the big comment above for more information.&lt;br /&gt;
            objMsg2.Display&lt;br /&gt;
            &lt;br /&gt;
            Dim objAttachments2 As Outlook.Attachments&lt;br /&gt;
            Set objAttachments2 = objMsg2.Attachments&lt;br /&gt;
            &lt;br /&gt;
            Dim msgAttachmentCount2 As Long&lt;br /&gt;
            msgAttachmentCount2 = objAttachments2.Count&lt;br /&gt;
            &lt;br /&gt;
            If msgAttachmentCount2 &amp;gt; 0 Then&lt;br /&gt;
                deletedMsg = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                Dim i As Long&lt;br /&gt;
                For i = msgAttachmentCount2 To 1 Step -1&lt;br /&gt;
                    deletedMsg = &amp;quot;[Attachment deleted: &amp;quot; &amp;amp; objAttachments2.Item(i).FileName &amp;amp; &amp;quot;]&amp;quot; &amp;amp; vbCrLf &amp;amp; deletedMsg&lt;br /&gt;
                    objAttachments2.Item(i).Delete&lt;br /&gt;
                Next i&lt;br /&gt;
                deletedMsg = deletedMsg &amp;amp; vbCrLf&lt;br /&gt;
               &lt;br /&gt;
                Dim objInsp As Outlook.Inspector&lt;br /&gt;
                Set objInsp = objMsg2.GetInspector&lt;br /&gt;
                &lt;br /&gt;
                Dim objDoc As Object  ' I haven't found out yet how to reference the Word classes from an Outlook 2010 VBA project,&lt;br /&gt;
                                      ' so I had to use a generic 'Object' type instead. The WdProtectionType constants below&lt;br /&gt;
                                      ' are not defined either, so I had to use their numeric values.&lt;br /&gt;
                Set objDoc = objInsp.WordEditor&lt;br /&gt;
                &lt;br /&gt;
                ' This was an attempt to execute the &amp;quot;EditMessage&amp;quot; command on thee-mail,&lt;br /&gt;
                ' but the call to 'Unprotect' below fails on my Outlook 2010:&lt;br /&gt;
                &lt;br /&gt;
                ' If you open an e-mail from the 'Drafts' folder, you can change it straight away. Otherwise, you normally&lt;br /&gt;
                ' get a write-protected view, where you can delete attachments (!) but not modify the text.&lt;br /&gt;
                ' In order to lift the protection, I tried a number of ways:&lt;br /&gt;
                '  - ActiveWindow.View.ReadingLayout = False&lt;br /&gt;
                '  - objDoc.UnProtect&lt;br /&gt;
                '  - objDoc.Protect WdProtectionType.wdNoProtection&lt;br /&gt;
                '  - objOL.ActiveInspector.CommandBars.ExecuteMso (&amp;quot;EditMessage&amp;quot;)&lt;br /&gt;
                ' None of the above worked, but I did find a method to remove the protection, see below:&lt;br /&gt;
                &lt;br /&gt;
                If objDoc.ProtectionType = 3 Then  ' Value 3 means WdProtectionType.wdAllowOnlyReading.&lt;br /&gt;
                  objInsp.CommandBars.ExecuteMso (&amp;quot;EditMessage&amp;quot;)&lt;br /&gt;
                End If&lt;br /&gt;
                &lt;br /&gt;
                If True Then&lt;br /&gt;
                  ' This method seems to work for all possible e-mail formats.&lt;br /&gt;
                  objDoc.Characters(1).InsertBefore deletedMsg&lt;br /&gt;
                Else&lt;br /&gt;
                  ' Old method, now unused, only kept for future reference.&lt;br /&gt;
                  If objMsg2.BodyFormat = olFormatHTML Then&lt;br /&gt;
                    ' Here we should do HTML escaping.&lt;br /&gt;
                    deletedMsg = Replace(deletedMsg, vbCrLf, &amp;quot;&amp;lt;br/&amp;gt;&amp;quot;)&lt;br /&gt;
                    objMsg2.HTMLBody = &amp;quot;&amp;lt;p&amp;gt;&amp;quot; &amp;amp; deletedMsg &amp;amp; &amp;quot;&amp;lt;/p&amp;gt;&amp;quot; &amp;amp; objMsg2.HTMLBody&lt;br /&gt;
                  ElseIf objMsg2.BodyFormat = olFormatRichText Then&lt;br /&gt;
                    ' I did not manage to edit the RTF format directly yet, because objMsg2.RTFBody&lt;br /&gt;
                    ' is not a string, but an array of bytes.&lt;br /&gt;
                    Err.Raise vbObjectError, , &amp;quot;Modifying an e-mail in RTF format not supported yet.&amp;quot;&lt;br /&gt;
                  ElseIf objMsg2.BodyFormat = olFormatPlain Then&lt;br /&gt;
                    objMsg2.Body = deletedMsg &amp;amp; objMsg2.Body&lt;br /&gt;
                  Else&lt;br /&gt;
                    Err.Raise vbObjectError, , &amp;quot;Unknown message text format.&amp;quot;&lt;br /&gt;
                  End If&lt;br /&gt;
                End If&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
    Next&lt;br /&gt;
    &lt;br /&gt;
    Exit Sub&lt;br /&gt;
    &lt;br /&gt;
ErrorHandler:&lt;br /&gt;
    &lt;br /&gt;
    Dim errMsgboxRes As VbMsgBoxResult&lt;br /&gt;
    errMsgboxRes = MsgBox(&amp;quot;Error: &amp;quot; &amp;amp; Err.Description, vbOKOnly + vbCritical)&lt;br /&gt;
  &lt;br /&gt;
End Sub&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdiez</name></author>	</entry>

	</feed>