<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Strip Outlook Attachments and Replace with Links</title>
	<atom:link href="http://manage-this.com/strip-outlook-attachments-vba/feed/" rel="self" type="application/rss+xml" />
	<link>http://manage-this.com/strip-outlook-attachments-vba/</link>
	<description></description>
	<lastBuildDate>Sun, 22 Apr 2012 22:50:33 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-23685</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Thu, 03 Feb 2011 02:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-23685</guid>
		<description>Hi Kurt -

The macro is really designed to work in batch/silent mode, so rather than prompting you for a location for each message it just goes to work.  It is definitely possible to modify this and have it prompt you for a save location on each message.  Unfortunately, I don&#039;t have time to maintain this macro and add new features - that is why the Google Code project was started.  I would recommend posting a request &lt;a href=&quot;http://code.google.com/p/lightlook/&quot; rel=&quot;nofollow&quot;&gt;on the project page&lt;/a&gt;.

-Carl</description>
		<content:encoded><![CDATA[<p>Hi Kurt -</p>
<p>The macro is really designed to work in batch/silent mode, so rather than prompting you for a location for each message it just goes to work.  It is definitely possible to modify this and have it prompt you for a save location on each message.  Unfortunately, I don&#8217;t have time to maintain this macro and add new features &#8211; that is why the Google Code project was started.  I would recommend posting a request <a href="http://code.google.com/p/lightlook/">on the project page</a>.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kurt</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-23439</link>
		<dc:creator>Kurt</dc:creator>
		<pubDate>Mon, 31 Jan 2011 16:14:38 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-23439</guid>
		<description>Hi Carl

This is probably one of the best Codes for VBA ive ever seen. But one question left. Is it possible to replace the fix root string with a dirlistbox like the one of John Walkenbach. im not a programmer, but i think for you its done in heartbeat. the rest works perfect and thanks for all your work

Greetings Kurt</description>
		<content:encoded><![CDATA[<p>Hi Carl</p>
<p>This is probably one of the best Codes for VBA ive ever seen. But one question left. Is it possible to replace the fix root string with a dirlistbox like the one of John Walkenbach. im not a programmer, but i think for you its done in heartbeat. the rest works perfect and thanks for all your work</p>
<p>Greetings Kurt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-22365</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Tue, 18 Jan 2011 03:17:18 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-22365</guid>
		<description>Hi Felice - 

The code places a text-only *copy* of the message in the attachment folder for reference, but the original message is not moved.  The size of the message will change since the attachments are removed.  If you are sorting the message list by size, the message will jump to a different location in the sort order.  It may looks like it is gone, but it is likely still in the folder.  Hopefully that is the case.

-Carl</description>
		<content:encoded><![CDATA[<p>Hi Felice &#8211; </p>
<p>The code places a text-only *copy* of the message in the attachment folder for reference, but the original message is not moved.  The size of the message will change since the attachments are removed.  If you are sorting the message list by size, the message will jump to a different location in the sort order.  It may looks like it is gone, but it is likely still in the folder.  Hopefully that is the case.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Felice</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-20192</link>
		<dc:creator>Felice</dc:creator>
		<pubDate>Thu, 16 Dec 2010 13:54:39 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-20192</guid>
		<description>Hi,
nice code. I don&#039;t use VB but C# then this code its not completely clear for me.
However, I have followed the instruction but the result I have is that the selected mail disappear completely from outlook and its moved in the attachment folder. 
Can someone please help!!

Thansk</description>
		<content:encoded><![CDATA[<p>Hi,<br />
nice code. I don&#8217;t use VB but C# then this code its not completely clear for me.<br />
However, I have followed the instruction but the result I have is that the selected mail disappear completely from outlook and its moved in the attachment folder.<br />
Can someone please help!!</p>
<p>Thansk</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-19121</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Sun, 28 Nov 2010 07:38:17 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-19121</guid>
		<description>For item 1, this may be the error that occurs when there is some unusual character in the subject line that is unsupported in a Windows file name.  The subject line is used to create the file name when saving the TXT version of the message.  There is a line in the macro that attempts to strip all of these characters (see the &quot;invalidChars&quot; array).  You may need to add one to the array.  You could also default to a simpler file name (see section where objMsg.InternetCodepage is checked).

For item 2, you can try to adjust the threshold size to exclude smaller messages.  Another possibility is checking attachment types.  OLE objects are already excluded (see oleFound flag).

If those suggestions don&#039;t help, I would recommend posting to the &lt;a href=&quot;http://code.google.com/p/lightlook/&quot; rel=&quot;nofollow&quot;&gt;group where the source code is now maintained&lt;/a&gt;.

Hope that helps!

-Carl</description>
		<content:encoded><![CDATA[<p>For item 1, this may be the error that occurs when there is some unusual character in the subject line that is unsupported in a Windows file name.  The subject line is used to create the file name when saving the TXT version of the message.  There is a line in the macro that attempts to strip all of these characters (see the &#8220;invalidChars&#8221; array).  You may need to add one to the array.  You could also default to a simpler file name (see section where objMsg.InternetCodepage is checked).</p>
<p>For item 2, you can try to adjust the threshold size to exclude smaller messages.  Another possibility is checking attachment types.  OLE objects are already excluded (see oleFound flag).</p>
<p>If those suggestions don&#8217;t help, I would recommend posting to the <a href="http://code.google.com/p/lightlook/">group where the source code is now maintained</a>.</p>
<p>Hope that helps!</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liquidenbar</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-18615</link>
		<dc:creator>Liquidenbar</dc:creator>
		<pubDate>Sat, 20 Nov 2010 14:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-18615</guid>
		<description>Hi Carl,

Great VBA Macro ! congratulations. I previously used &quot;Attachment Remover&quot; a free plug-in for IE but with the last rules of my IT management I have had to remove it (it&#039;s not authorized !).
Your macro is working fine and is very well documented but I have a few questions (I didn&#039;t find the answers in the present forum).
1- For a few e-mails with various attachments (not a certain type) I get an error message 
[RemoveAttachments() Subroutine
Error Code: -2147467259]
It is the command line [objMsg.SaveAs msgFolder &amp; msgSubject &amp; &quot;.txt&quot;, olTXT] which induces this error
Do you have a suggestion to solve this issue ?
2- With e-mails where there are pictures (*.jpg mainly) inside (not attached) the macro also removes these pictures.
Is it possible not to remove these pictures ?

Many thanks in advance for your support

L. Iquidenbar</description>
		<content:encoded><![CDATA[<p>Hi Carl,</p>
<p>Great VBA Macro ! congratulations. I previously used &#8220;Attachment Remover&#8221; a free plug-in for IE but with the last rules of my IT management I have had to remove it (it&#8217;s not authorized !).<br />
Your macro is working fine and is very well documented but I have a few questions (I didn&#8217;t find the answers in the present forum).<br />
1- For a few e-mails with various attachments (not a certain type) I get an error message<br />
[RemoveAttachments() Subroutine<br />
Error Code: -2147467259]<br />
It is the command line [objMsg.SaveAs msgFolder &amp; msgSubject &amp; ".txt", olTXT] which induces this error<br />
Do you have a suggestion to solve this issue ?<br />
2- With e-mails where there are pictures (*.jpg mainly) inside (not attached) the macro also removes these pictures.<br />
Is it possible not to remove these pictures ?</p>
<p>Many thanks in advance for your support</p>
<p>L. Iquidenbar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-14383</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Thu, 05 Aug 2010 04:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-14383</guid>
		<description>Marty - Thanks for the tip!  For someone that deals with a lot of attachments or is severely limited on Exchange server space, a commercial solution is probably the best bet.

There are also a lot of attachment management tools listed on the &lt;a href=&quot;http://www.slipstick.com/addins/attachments.asp&quot; rel=&quot;nofollow&quot;&gt;Slipstick Systems website&lt;/a&gt;.  There may be some free ones there that are pretty decent, but I haven&#039;t really tried any of them.

-Carl</description>
		<content:encoded><![CDATA[<p>Marty &#8211; Thanks for the tip!  For someone that deals with a lot of attachments or is severely limited on Exchange server space, a commercial solution is probably the best bet.</p>
<p>There are also a lot of attachment management tools listed on the <a href="http://www.slipstick.com/addins/attachments.asp">Slipstick Systems website</a>.  There may be some free ones there that are pretty decent, but I haven&#8217;t really tried any of them.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-14382</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Thu, 05 Aug 2010 04:20:32 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-14382</guid>
		<description>Tommyzoom - Unfortunately there&#039;s no easy way to do this with this code.  That is why in addition to links to the files, the macro also inserts a link to the *folder* at the top of the list.

To quickly forward the message with its original attachments intact, I first click the folder link to open the folder.  I then forward the message.  In the edit window of the forwarded message, I drag the files to attach them.  I also delete the list of links and the &quot;Attachments Removed&quot; attachment.  It does take a few steps, but it&#039;s not too bad if you use the folder link.  

Another tip is to not run the macro on messages right away.  I usually run the macro on older messages that have already been filed so it is less likely that I&#039;ll need to forward them.

You could also use a commercial tool like the one Marty mentions below.

Hope that helps!</description>
		<content:encoded><![CDATA[<p>Tommyzoom &#8211; Unfortunately there&#8217;s no easy way to do this with this code.  That is why in addition to links to the files, the macro also inserts a link to the *folder* at the top of the list.</p>
<p>To quickly forward the message with its original attachments intact, I first click the folder link to open the folder.  I then forward the message.  In the edit window of the forwarded message, I drag the files to attach them.  I also delete the list of links and the &#8220;Attachments Removed&#8221; attachment.  It does take a few steps, but it&#8217;s not too bad if you use the folder link.  </p>
<p>Another tip is to not run the macro on messages right away.  I usually run the macro on older messages that have already been filed so it is less likely that I&#8217;ll need to forward them.</p>
<p>You could also use a commercial tool like the one Marty mentions below.</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marty</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-14229</link>
		<dc:creator>Marty</dc:creator>
		<pubDate>Sat, 31 Jul 2010 08:57:12 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-14229</guid>
		<description>An off the shelf script / program I have used for several years is &#039;Attachments Processor for Outlook&#039; by MapiLab.  It does cost ($39) but is a robust &amp; reliable solution that has plenty of filters, rules and tweaks - the &#039;restore attachments&#039; and &#039;forward message w/ attachments&#039; being the key ones I use.

Marty</description>
		<content:encoded><![CDATA[<p>An off the shelf script / program I have used for several years is &#8216;Attachments Processor for Outlook&#8217; by MapiLab.  It does cost ($39) but is a robust &amp; reliable solution that has plenty of filters, rules and tweaks &#8211; the &#8216;restore attachments&#8217; and &#8216;forward message w/ attachments&#8217; being the key ones I use.</p>
<p>Marty</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tommyzoom</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-14202</link>
		<dc:creator>Tommyzoom</dc:creator>
		<pubDate>Fri, 30 Jul 2010 11:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-14202</guid>
		<description>Excellent code BTW I have used something similar to Stub my Public folders, Saving gallons of space. Occasionally our user need to bind the attachments back in to their emails so that they can forward them. At the moment I have to edit the email, navigate to the attachment and manually reattach it to the email. Do you have some code for doing this. I was thinking of creating a macro button and then distributing it. I can’t figure the code out however. Is this something you could help with?</description>
		<content:encoded><![CDATA[<p>Excellent code BTW I have used something similar to Stub my Public folders, Saving gallons of space. Occasionally our user need to bind the attachments back in to their emails so that they can forward them. At the moment I have to edit the email, navigate to the attachment and manually reattach it to the email. Do you have some code for doing this. I was thinking of creating a macro button and then distributing it. I can’t figure the code out however. Is this something you could help with?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-11335</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Tue, 02 Mar 2010 01:34:33 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-11335</guid>
		<description>Hi Chuck -

I agree, that was definitely something I was hoping to add.  If you dig into the macro code, you&#039;ll notice that the links inserted into the email are tagged with the &lt;a href=&quot;http://www.w3.org/TR/html401/types.html#type-links&quot; rel=&quot;nofollow&quot;&gt;link type&lt;/a&gt; of &quot;REL=ATT_LNK&quot;.  This is sort of a made up tag I used to indicate &quot;attachment links&quot;.  I was hoping a later version of the code could use these links to find the original attachment and replace it when a message is forwarded.  

I haven&#039;t had much time to enhance this code, which is why I agreed to let it move to the &lt;a href=&quot;http://code.google.com/p/lightlook/&quot; rel=&quot;nofollow&quot;&gt;open source project&lt;/a&gt;.   You may want to raise this request on the &lt;a href=&quot;http://code.google.com/p/lightlook/&quot; rel=&quot;nofollow&quot;&gt;project page&lt;/a&gt; there.

-Carl</description>
		<content:encoded><![CDATA[<p>Hi Chuck -</p>
<p>I agree, that was definitely something I was hoping to add.  If you dig into the macro code, you&#8217;ll notice that the links inserted into the email are tagged with the <a href="http://www.w3.org/TR/html401/types.html#type-links">link type</a> of &#8220;REL=ATT_LNK&#8221;.  This is sort of a made up tag I used to indicate &#8220;attachment links&#8221;.  I was hoping a later version of the code could use these links to find the original attachment and replace it when a message is forwarded.  </p>
<p>I haven&#8217;t had much time to enhance this code, which is why I agreed to let it move to the <a href="http://code.google.com/p/lightlook/">open source project</a>.   You may want to raise this request on the <a href="http://code.google.com/p/lightlook/">project page</a> there.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chuck</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-11333</link>
		<dc:creator>Chuck</dc:creator>
		<pubDate>Mon, 01 Mar 2010 22:39:41 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-11333</guid>
		<description>This is great! Now we just need a way to reattach the docuemnts if I want to forward the original email. Maybe something in conjunction the &quot;Handy Outlook Attchment Reminder&quot; (http://manage-this.com/handy-outlook-attachment-reminder-macro/) that looks for the &quot;Attachments Archived: &quot; line and then reassociates the files.</description>
		<content:encoded><![CDATA[<p>This is great! Now we just need a way to reattach the docuemnts if I want to forward the original email. Maybe something in conjunction the &#8220;Handy Outlook Attchment Reminder&#8221; (<a href="http://manage-this.com/handy-outlook-attachment-reminder-macro/">http://manage-this.com/handy-outlook-attachment-reminder-macro/</a>) that looks for the &#8220;Attachments Archived: &#8221; line and then reassociates the files.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9688</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Thu, 05 Nov 2009 03:22:36 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9688</guid>
		<description>Hi Steve - This can be done, but it requires additional changes since these are different types of objects in Outlook.  See the comments from Aug 26th above for some code snippets from Dennis and some discussion.  If it&#039;s something you would really like to see, you can request to have the code added to the next version &lt;a href=&quot;http://code.google.com/p/lightlook/&quot; rel=&quot;nofollow&quot;&gt;on the project page&lt;/a&gt;.

-Carl</description>
		<content:encoded><![CDATA[<p>Hi Steve &#8211; This can be done, but it requires additional changes since these are different types of objects in Outlook.  See the comments from Aug 26th above for some code snippets from Dennis and some discussion.  If it&#8217;s something you would really like to see, you can request to have the code added to the next version <a href="http://code.google.com/p/lightlook/">on the project page</a>.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Fishwick</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9552</link>
		<dc:creator>Stephen Fishwick</dc:creator>
		<pubDate>Wed, 28 Oct 2009 16:12:04 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9552</guid>
		<description>Hi,

Great bit of code. Is there anyway of adopting this to remove attachments in calendar items?

Removing the following code does not help, errors out with 438 object does not support property or method.

&quot;If objMsg.Class = olMail Then&quot;

Many thanks, Steve.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Great bit of code. Is there anyway of adopting this to remove attachments in calendar items?</p>
<p>Removing the following code does not help, errors out with 438 object does not support property or method.</p>
<p>&#8220;If objMsg.Class = olMail Then&#8221;</p>
<p>Many thanks, Steve.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9455</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Fri, 23 Oct 2009 12:27:46 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9455</guid>
		<description>jumpjack - Looks nice!  I added some notes above to point people to the Google Code project.  My email information is available on the About tab above.

-Carl</description>
		<content:encoded><![CDATA[<p>jumpjack &#8211; Looks nice!  I added some notes above to point people to the Google Code project.  My email information is available on the About tab above.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jumpjack</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9437</link>
		<dc:creator>jumpjack</dc:creator>
		<pubDate>Thu, 22 Oct 2009 12:15:43 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9437</guid>
		<description>carl, I created the project on Google:
http://code.google.com/p/lightlook/

if you send me your email, I can add you to developers group.</description>
		<content:encoded><![CDATA[<p>carl, I created the project on Google:<br />
<a href="http://code.google.com/p/lightlook/">http://code.google.com/p/lightlook/</a></p>
<p>if you send me your email, I can add you to developers group.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9435</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Thu, 22 Oct 2009 11:11:10 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9435</guid>
		<description>Sam - No problem, thanks for sharing your solution!  The original macro separated the files into time-stamped folders, so if you want everything in one folder, what you did is probably the best solution. 

-Carl</description>
		<content:encoded><![CDATA[<p>Sam &#8211; No problem, thanks for sharing your solution!  The original macro separated the files into time-stamped folders, so if you want everything in one folder, what you did is probably the best solution. </p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9433</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Thu, 22 Oct 2009 09:25:28 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9433</guid>
		<description>ok i solved it... 

attFileName = Strings.Format(objMsg.ReceivedTime, &quot;yyyy.mm.dd.hhnnss&quot;) &amp; objAttachments.Item(i).FileName

I added the time stamp to the filename.. haha.. sorry for flooding</description>
		<content:encoded><![CDATA[<p>ok i solved it&#8230; </p>
<p>attFileName = Strings.Format(objMsg.ReceivedTime, &#8220;yyyy.mm.dd.hhnnss&#8221;) &amp; objAttachments.Item(i).FileName</p>
<p>I added the time stamp to the filename.. haha.. sorry for flooding</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9432</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Thu, 22 Oct 2009 09:00:49 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9432</guid>
		<description>A bit more background on my issue - i have tweaked the macro to save all stripped attachments into a single folder, so i now face the problem of identical filenames.

What i tried to do is,
attFileName = objAttachments.Item(i).FileName
attPath = msgFolder &amp; &quot;\\&quot; &amp; attFileName

And replaced it with
attFileName = attFileName = Strings.Format(objMsg.ReceivedTime, &quot;yyyy.mm.dd.hhnnss&quot;)
attPath = msgFolder &amp; &quot;\\&quot; &amp; attFileName

It &quot;sort of&quot; works, but the file is now an unrecognizable file in my window&#039;s folder with the yyyy.mm.dd.hhnnss filename.

i&#039;m stuck...</description>
		<content:encoded><![CDATA[<p>A bit more background on my issue &#8211; i have tweaked the macro to save all stripped attachments into a single folder, so i now face the problem of identical filenames.</p>
<p>What i tried to do is,<br />
attFileName = objAttachments.Item(i).FileName<br />
attPath = msgFolder &amp; &#8220;\\&#8221; &amp; attFileName</p>
<p>And replaced it with<br />
attFileName = attFileName = Strings.Format(objMsg.ReceivedTime, &#8220;yyyy.mm.dd.hhnnss&#8221;)<br />
attPath = msgFolder &amp; &#8220;\\&#8221; &amp; attFileName</p>
<p>It &#8220;sort of&#8221; works, but the file is now an unrecognizable file in my window&#8217;s folder with the yyyy.mm.dd.hhnnss filename.</p>
<p>i&#8217;m stuck&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9429</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Thu, 22 Oct 2009 08:06:18 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9429</guid>
		<description>Hi all, I encountered another issue though. I have a outlook folder where all the emails are of the same title, from the same sender and all their individual attachments are of the same name.

The only distinction is that these emails are sent at different times.

What do i tweak to the macro in oder to 
step 1) strip the attachments over to my windows folder
step 2) rename the attachments according to the time/date stamp of the email?

Please help? Thanks!

Sam</description>
		<content:encoded><![CDATA[<p>Hi all, I encountered another issue though. I have a outlook folder where all the emails are of the same title, from the same sender and all their individual attachments are of the same name.</p>
<p>The only distinction is that these emails are sent at different times.</p>
<p>What do i tweak to the macro in oder to<br />
step 1) strip the attachments over to my windows folder<br />
step 2) rename the attachments according to the time/date stamp of the email?</p>
<p>Please help? Thanks!</p>
<p>Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9353</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Fri, 16 Oct 2009 17:35:03 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9353</guid>
		<description>Hi Jonny - That is certainly possible, although I haven&#039;t seen any examples of it.  I&#039;m a bit of a pack rat, which is why I needed the attachment stripper in the first place, so I don&#039;t tend to delete much :-).

-Carl</description>
		<content:encoded><![CDATA[<p>Hi Jonny &#8211; That is certainly possible, although I haven&#8217;t seen any examples of it.  I&#8217;m a bit of a pack rat, which is why I needed the attachment stripper in the first place, so I don&#8217;t tend to delete much <img src='http://manage-this.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonny</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9347</link>
		<dc:creator>Jonny</dc:creator>
		<pubDate>Fri, 16 Oct 2009 13:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9347</guid>
		<description>Hi,

Fantastic!

Are you aware of anyone having created a script to delete the saved attachment when a mail message is deleted to keep the attachment folder as tidy as your inbox?

I guess if the attachment is named with logic the same logic could be applied to find and destroy the attachment triggered by the BeforeDelete event.

I&#039;m no programmer so maybe a more accomplished writer may have already done the script?

Thanks again,
Jonny.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Fantastic!</p>
<p>Are you aware of anyone having created a script to delete the saved attachment when a mail message is deleted to keep the attachment folder as tidy as your inbox?</p>
<p>I guess if the attachment is named with logic the same logic could be applied to find and destroy the attachment triggered by the BeforeDelete event.</p>
<p>I&#8217;m no programmer so maybe a more accomplished writer may have already done the script?</p>
<p>Thanks again,<br />
Jonny.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9313</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Wed, 14 Oct 2009 00:07:17 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9313</guid>
		<description>jumpjack - Here are some responses to your questions &amp; comments...

[0]  I guess I assumed you would not want to edit the folder names.  Depending on how many folders you would have to edit (10, 100, 1000?) it may not be worth the effort.

[1]  Regarding the notifications, unfortunately that&#039;s not available. I thought about disabling comments altogether and instead implementing a forum.  It&#039;s great that there is more interactive discussion going on, and that would probably be easier to do with a &lt;a href=&quot;http://www.phpbb.com/&quot; rel=&quot;nofollow&quot;&gt;proper forum&lt;/a&gt;.

[2] I think it would be good to move the macro to someplace like &lt;a href=&quot;http://www.google.com/#hl=en&amp;tbo=1&amp;tbs=qdr%3Ay&amp;q=sourceforge+vs.+google+code&amp;aq=f&amp;aqi=&amp;aq=f&amp;aqi=g1&amp;oq=&amp;fp=c3836f5c7faf4741&quot; rel=&quot;nofollow&quot;&gt;GoogleCode or SourceForge&lt;/a&gt;.  Unfortunately I don&#039;t have the time to set it up or maintain it.  If you are motivated to do it, it&#039;s all yours!  All I would ask is that you keep a reference link back to the original post here.

[3]  Very good catch on the &quot;#&quot; character, nice work!  I haven&#039;t run into that problem, but was able to reproduce it after you pointed it out.  The &quot;#&quot; is a valid path/file name character in Windows, so I&#039;m not sure why Outlook is choking on it.  The easiest fix is to just add it to the invalid character list on this line:

invalidChars = Array(&quot;\&quot;, &quot;/&quot;, &quot;:&quot;, &quot;*&quot;, &quot;?&quot;, &quot;&quot;&quot;&quot;, &quot;&quot;, &quot;&#124;&quot;, &quot;…&quot;)

That seemed to work just fine.

-Carl</description>
		<content:encoded><![CDATA[<p>jumpjack &#8211; Here are some responses to your questions &amp; comments&#8230;</p>
<p>[0]  I guess I assumed you would not want to edit the folder names.  Depending on how many folders you would have to edit (10, 100, 1000?) it may not be worth the effort.</p>
<p>[1]  Regarding the notifications, unfortunately that&#8217;s not available. I thought about disabling comments altogether and instead implementing a forum.  It&#8217;s great that there is more interactive discussion going on, and that would probably be easier to do with a <a href="http://www.phpbb.com/">proper forum</a>.</p>
<p>[2] I think it would be good to move the macro to someplace like <a href="http://www.google.com/#hl=en&amp;tbo=1&amp;tbs=qdr%3Ay&amp;q=sourceforge+vs.+google+code&amp;aq=f&amp;aqi=&amp;aq=f&amp;aqi=g1&amp;oq=&amp;fp=c3836f5c7faf4741">GoogleCode or SourceForge</a>.  Unfortunately I don&#8217;t have the time to set it up or maintain it.  If you are motivated to do it, it&#8217;s all yours!  All I would ask is that you keep a reference link back to the original post here.</p>
<p>[3]  Very good catch on the &#8220;#&#8221; character, nice work!  I haven&#8217;t run into that problem, but was able to reproduce it after you pointed it out.  The &#8220;#&#8221; is a valid path/file name character in Windows, so I&#8217;m not sure why Outlook is choking on it.  The easiest fix is to just add it to the invalid character list on this line:</p>
<p>invalidChars = Array(&#8220;\&#8221;, &#8220;/&#8221;, &#8220;:&#8221;, &#8220;*&#8221;, &#8220;?&#8221;, &#8220;&#8221;"&#8221;, &#8220;&#8221;, &#8220;|&#8221;, &#8220;…&#8221;)</p>
<p>That seemed to work just fine.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jumpjack</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9304</link>
		<dc:creator>jumpjack</dc:creator>
		<pubDate>Tue, 13 Oct 2009 14:21:58 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9304</guid>
		<description>For some reason, it looks like Outlook does not like links containing &quot;#&quot; characters: my broken links are NOT too long links, but links including this character, whose corresponding folders have name ending at the character right before the &quot;#&quot;.
???</description>
		<content:encoded><![CDATA[<p>For some reason, it looks like Outlook does not like links containing &#8220;#&#8221; characters: my broken links are NOT too long links, but links including this character, whose corresponding folders have name ending at the character right before the &#8220;#&#8221;.<br />
???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jumpjack</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9303</link>
		<dc:creator>jumpjack</dc:creator>
		<pubDate>Tue, 13 Oct 2009 14:15:35 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9303</guid>
		<description>Carl,
yes, that&#039;s what I was asking for. Of course I should also rename the folders to make them manageable by new outlook links.
Or maybe I should just edit folders names to get them down to 256 characters?

Two more questions:
1 - Doesn&#039;t dis blog notify users about replies to comments?!?
2 - Isn&#039;t it time to put this project on GoogleCode for better management? ;-)
http://code.google.com</description>
		<content:encoded><![CDATA[<p>Carl,<br />
yes, that&#8217;s what I was asking for. Of course I should also rename the folders to make them manageable by new outlook links.<br />
Or maybe I should just edit folders names to get them down to 256 characters?</p>
<p>Two more questions:<br />
1 &#8211; Doesn&#8217;t dis blog notify users about replies to comments?!?<br />
2 &#8211; Isn&#8217;t it time to put this project on GoogleCode for better management? <img src='http://manage-this.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
<a href="http://code.google.com">http://code.google.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9271</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Sun, 11 Oct 2009 16:49:58 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9271</guid>
		<description>jumpjack - 

Thanks again for your comments.  You had also asked about going back to messages that were previously processed and re-processing them to have shorter links.  I think that will be very tricky.  There is a field I added to the links to help you search on ones created by this macro.  If you notice in the code, the file links contain a reference &quot;REL=ATT_LNK&quot; to help identify them.  &quot;ATT_LNK&quot; was just something I made up in case I had to search for those links later.  You could create a separate macro that searches the HTML body of each message and edits those links if they are too long based on certain criteria.  The problem, however, is that the actual path names on disk will then not match and you will have broken links.  (Unless I am misunderstanding your question?)  Creating a macro that changed both the links inside the message and the real folder path on disk would be a lot of work.  I think it would be easiest to just retrieve those attachments where you have path length errors by manually browsing for the folder.  Since only certain messages would be affected, and the folders are named/sorted by the message date, it should be relatively easy to find.  I just don&#039;t think it would be worth your time to go backwards and try to re-process older messages.

-Carl</description>
		<content:encoded><![CDATA[<p>jumpjack &#8211; </p>
<p>Thanks again for your comments.  You had also asked about going back to messages that were previously processed and re-processing them to have shorter links.  I think that will be very tricky.  There is a field I added to the links to help you search on ones created by this macro.  If you notice in the code, the file links contain a reference &#8220;REL=ATT_LNK&#8221; to help identify them.  &#8220;ATT_LNK&#8221; was just something I made up in case I had to search for those links later.  You could create a separate macro that searches the HTML body of each message and edits those links if they are too long based on certain criteria.  The problem, however, is that the actual path names on disk will then not match and you will have broken links.  (Unless I am misunderstanding your question?)  Creating a macro that changed both the links inside the message and the real folder path on disk would be a lot of work.  I think it would be easiest to just retrieve those attachments where you have path length errors by manually browsing for the folder.  Since only certain messages would be affected, and the folders are named/sorted by the message date, it should be relatively easy to find.  I just don&#8217;t think it would be worth your time to go backwards and try to re-process older messages.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9270</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Sun, 11 Oct 2009 16:37:30 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9270</guid>
		<description>Sam - The error message you mentioned might be related to the object type, as jumpjack mentioned.  I would try debugging as he suggested.  In order to allow the Outlook debugger to trigger, you will have to comment out this line near the top of the macro:  

On Error GoTo ErrorHandler

Also, there is currently an issue with running this macro on 100+ messages at once (at least if all 100 have attachments).  See comments above from September 17th, 2009 at 12:27 pm.  If you run this on a folder with 3000 emails I&#039;m sure you will see this issue.  I don&#039;t have a workaround for this yet.

-Carl</description>
		<content:encoded><![CDATA[<p>Sam &#8211; The error message you mentioned might be related to the object type, as jumpjack mentioned.  I would try debugging as he suggested.  In order to allow the Outlook debugger to trigger, you will have to comment out this line near the top of the macro:  </p>
<p>On Error GoTo ErrorHandler</p>
<p>Also, there is currently an issue with running this macro on 100+ messages at once (at least if all 100 have attachments).  See comments above from September 17th, 2009 at 12:27 pm.  If you run this on a folder with 3000 emails I&#8217;m sure you will see this issue.  I don&#8217;t have a workaround for this yet.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jumpjack</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-2/#comment-9182</link>
		<dc:creator>jumpjack</dc:creator>
		<pubDate>Thu, 01 Oct 2009 12:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9182</guid>
		<description>Sam,  I think it&#039;s not a matter of number, but of type: maybe you selected also &quot;messages&quot; which are not actually mail messages: maybe they are schedule proposals, or return receipts, and so on, which cannot have attachments.

Does your version of the macro contain this line?
If objMsg.Class = olMail Then

If yes, try clicking on DEBUG button upon enconutering the error you mentioned, and try determining WHICH message exactly is raising the error: it should have &quot;something strange&quot;...
Use:
print objmsg.senton

it should print date of creation/receipt of the messagem thus allowing you to easily find it.
-------------

Apart from this, how can I fix the messages processed with previous version of macro which had the  &quot;too long folder&quot; issue preventing from opening the attachments with a click?
(see comment July 17th, 2009 at 2:41 pm  )</description>
		<content:encoded><![CDATA[<p>Sam,  I think it&#8217;s not a matter of number, but of type: maybe you selected also &#8220;messages&#8221; which are not actually mail messages: maybe they are schedule proposals, or return receipts, and so on, which cannot have attachments.</p>
<p>Does your version of the macro contain this line?<br />
If objMsg.Class = olMail Then</p>
<p>If yes, try clicking on DEBUG button upon enconutering the error you mentioned, and try determining WHICH message exactly is raising the error: it should have &#8220;something strange&#8221;&#8230;<br />
Use:<br />
print objmsg.senton</p>
<p>it should print date of creation/receipt of the messagem thus allowing you to easily find it.<br />
&#8212;&#8212;&#8212;&#8212;-</p>
<p>Apart from this, how can I fix the messages processed with previous version of macro which had the  &#8220;too long folder&#8221; issue preventing from opening the attachments with a click?<br />
(see comment July 17th, 2009 at 2:41 pm  )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-9147</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Mon, 28 Sep 2009 09:49:49 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-9147</guid>
		<description>Super macro! i&#039;ve been using it and tweaking it to only copy out attachments and pasting them into one single folder.

question: an error occurs when i run the macro on too many emails i get the following error
&quot;error code: -2147467259
Method &#039;Attachments&#039; of object &#039;MailItem&#039; failed&quot;

any idea how i can run it for a folder of more than 3000+ emails?

thanks!</description>
		<content:encoded><![CDATA[<p>Super macro! i&#8217;ve been using it and tweaking it to only copy out attachments and pasting them into one single folder.</p>
<p>question: an error occurs when i run the macro on too many emails i get the following error<br />
&#8220;error code: -2147467259<br />
Method &#8216;Attachments&#8217; of object &#8216;MailItem&#8217; failed&#8221;</p>
<p>any idea how i can run it for a folder of more than 3000+ emails?</p>
<p>thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8947</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Thu, 17 Sep 2009 18:27:32 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8947</guid>
		<description>Antony - That&#039;s strange, I&#039;ve never encountered this behavior before, but I just tried to force it and I saw the same issue you mentioned.  The error message is &quot;Error Code: -1179631611  Can&#039;t create file: Attachments Removed.  Right-click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder.&quot;   This is a generic error message from Outlook, not from the macro itself.

To force this error to happen, I had to select 100 or more messages that actually had attachments larger than the threshold.  In my case, this meant selecting about 500 messages at once, since many of my messages either had smaller attachments or none at all.  Everything &lt;i&gt;does&lt;/i&gt; get cleaned up when the macro exists, so you can run it over and over again without any problems, as long as you select about 100 messages at a time.  As a side note, I think Outlook is storing the temp files in a different location on my machine.  I&#039;ll have to look into what&#039;s causing this.

Thanks for bringing this up!

-Carl</description>
		<content:encoded><![CDATA[<p>Antony &#8211; That&#8217;s strange, I&#8217;ve never encountered this behavior before, but I just tried to force it and I saw the same issue you mentioned.  The error message is &#8220;Error Code: -1179631611  Can&#8217;t create file: Attachments Removed.  Right-click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder.&#8221;   This is a generic error message from Outlook, not from the macro itself.</p>
<p>To force this error to happen, I had to select 100 or more messages that actually had attachments larger than the threshold.  In my case, this meant selecting about 500 messages at once, since many of my messages either had smaller attachments or none at all.  Everything <i>does</i> get cleaned up when the macro exists, so you can run it over and over again without any problems, as long as you select about 100 messages at a time.  As a side note, I think Outlook is storing the temp files in a different location on my machine.  I&#8217;ll have to look into what&#8217;s causing this.</p>
<p>Thanks for bringing this up!</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antony</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8935</link>
		<dc:creator>Antony</dc:creator>
		<pubDate>Thu, 17 Sep 2009 11:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8935</guid>
		<description>It seems to be a garbage collection issue, since once the macro terminates, all the temporary files are removed... I tried adding:

TheNextMessage:
Set objAttachments = Nothing
Set objMsg = Nothing
Next objMsg

But that doesn&#039;t seem to be enough.  -- Antony</description>
		<content:encoded><![CDATA[<p>It seems to be a garbage collection issue, since once the macro terminates, all the temporary files are removed&#8230; I tried adding:</p>
<p>TheNextMessage:<br />
Set objAttachments = Nothing<br />
Set objMsg = Nothing<br />
Next objMsg</p>
<p>But that doesn&#8217;t seem to be enough.  &#8212; Antony</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antony</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8932</link>
		<dc:creator>Antony</dc:creator>
		<pubDate>Thu, 17 Sep 2009 11:02:59 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8932</guid>
		<description>Genius tool.  One issue/question...

Outlook seems to be creating numbered copies of the &quot;Attachments Removed&quot; file in C:\Documents and Settings\\Local Settings\Temporary Internet Files\OLK

It can only handle up to 99 such files, hence unless I manually delete the files it creates as it&#039;s running - it fails after 100 replacements.  Any ideas on a correct fix?</description>
		<content:encoded><![CDATA[<p>Genius tool.  One issue/question&#8230;</p>
<p>Outlook seems to be creating numbered copies of the &#8220;Attachments Removed&#8221; file in C:\Documents and Settings\\Local Settings\Temporary Internet Files\OLK</p>
<p>It can only handle up to 99 such files, hence unless I manually delete the files it creates as it&#8217;s running &#8211; it fails after 100 replacements.  Any ideas on a correct fix?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8925</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Thu, 17 Sep 2009 04:09:48 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8925</guid>
		<description>jumpjack - That makes sense.  It might be better, then, to separate the attachments using the sender address.  All emails sent from yourself could have attachments put in one folder, and all other emails could have the attachments put in a separate folder.  

Sometimes emails that I sent myself end up in my Inbox.  Also, once emails are moved to the archive, they could be mixed together.  That would make it hard to separate them using &quot;.CurrentFolder.Name&quot;, but the sender name will be the same even if the email is moved.  Just an idea!

-Carl</description>
		<content:encoded><![CDATA[<p>jumpjack &#8211; That makes sense.  It might be better, then, to separate the attachments using the sender address.  All emails sent from yourself could have attachments put in one folder, and all other emails could have the attachments put in a separate folder.  </p>
<p>Sometimes emails that I sent myself end up in my Inbox.  Also, once emails are moved to the archive, they could be mixed together.  That would make it hard to separate them using &#8220;.CurrentFolder.Name&#8221;, but the sender name will be the same even if the email is moved.  Just an idea!</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jumpjack</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8880</link>
		<dc:creator>jumpjack</dc:creator>
		<pubDate>Tue, 15 Sep 2009 08:36:29 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8880</guid>
		<description>yes, I prefer separating sent from received attachments. I think it&#039;s just a matter of personal &quot;orientation&quot;.</description>
		<content:encoded><![CDATA[<p>yes, I prefer separating sent from received attachments. I think it&#8217;s just a matter of personal &#8220;orientation&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8873</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Tue, 15 Sep 2009 02:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8873</guid>
		<description>jumpjack -

Thanks for your suggestions!  The progress bar sounds interesting.  I&#039;m not sure if I understand why you would want to add an &quot;inbox&quot; folder to the save path...  Is that to separate attachments that you send from attachments that other people send to you?  Sometimes I run this macro on a message after I have already moved it out of the inbox, so I&#039;m not sure this modification would work for me.

-Carl</description>
		<content:encoded><![CDATA[<p>jumpjack -</p>
<p>Thanks for your suggestions!  The progress bar sounds interesting.  I&#8217;m not sure if I understand why you would want to add an &#8220;inbox&#8221; folder to the save path&#8230;  Is that to separate attachments that you send from attachments that other people send to you?  Sometimes I run this macro on a message after I have already moved it out of the inbox, so I&#8217;m not sure this modification would work for me.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jumpjack</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8861</link>
		<dc:creator>jumpjack</dc:creator>
		<pubDate>Mon, 14 Sep 2009 08:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8861</guid>
		<description>My idea for progress gauge:
[...]
For Each objMsg In objSelectedItems
    &#039; Code for progress gauge related to messages count:
    Partial = Partial + 1
    ProgressGauge = Int(100 * Partial / Total)
    frmProgress.lblMsgGauge.Width = ProgressGauge
    frmProgress.lblMsgPerc.Caption = Str$(ProgressGauge) &amp; &quot; %&quot;
    frmProgress.lblMsgPerc.Left = ProgressGauge + 20
    &#039; Reset attachments gauge
    frmProgress.lblAttGauge.Width = 0
    frmProgress.lblAttPerc = 0
    frmProgress.lblAttPerc.Left = 10
    DoEvents &#039; Update form
[...]


[...]
    For i = objAttachments.Count To 1 Step -1
    PartialAtt = PartialAtt + 1
    ProgressGaugeAtt = Int(100 * PartialAtt / TotalAtt)
    frmProgress.lblAttGauge.Width = ProgressGaugeAtt
    frmProgress.lblAttPerc.Caption = Str$(ProgressGaugeAtt) &amp; &quot; %&quot;
    frmProgress.lblAttPerc.Left = ProgressGaugeAtt + 20
    DoEvents

[...]
You&#039;ll need a form named frmProgress containing 4 labels (2 for messages and 2 for attachments)

And to distinguish inbox from outbox:

    If InStr(UCase$(olns.Application.ActiveExplorer.CurrentFolder.Name), &quot;INVIATA&quot;) &gt; 0 Then
        msgFolder = RootFolder &amp; &quot;@inviata\\&quot; &amp; msgFolder &amp; &quot;\\&quot;
    Else
        msgFolder = RootFolder &amp; msgFolder &amp; &quot;\\&quot;
    End If

(but this is not portable fordifferenet languages, you must specify proper name for your outbox)

I put the &quot;@&quot; in front of folder name to have it always as first item listed in alphabetical order.</description>
		<content:encoded><![CDATA[<p>My idea for progress gauge:<br />
[...]<br />
For Each objMsg In objSelectedItems<br />
    &#8216; Code for progress gauge related to messages count:<br />
    Partial = Partial + 1<br />
    ProgressGauge = Int(100 * Partial / Total)<br />
    frmProgress.lblMsgGauge.Width = ProgressGauge<br />
    frmProgress.lblMsgPerc.Caption = Str$(ProgressGauge) &amp; &#8221; %&#8221;<br />
    frmProgress.lblMsgPerc.Left = ProgressGauge + 20<br />
    &#8216; Reset attachments gauge<br />
    frmProgress.lblAttGauge.Width = 0<br />
    frmProgress.lblAttPerc = 0<br />
    frmProgress.lblAttPerc.Left = 10<br />
    DoEvents &#8216; Update form<br />
[...]</p>
<p>[...]<br />
    For i = objAttachments.Count To 1 Step -1<br />
    PartialAtt = PartialAtt + 1<br />
    ProgressGaugeAtt = Int(100 * PartialAtt / TotalAtt)<br />
    frmProgress.lblAttGauge.Width = ProgressGaugeAtt<br />
    frmProgress.lblAttPerc.Caption = Str$(ProgressGaugeAtt) &amp; &#8221; %&#8221;<br />
    frmProgress.lblAttPerc.Left = ProgressGaugeAtt + 20<br />
    DoEvents</p>
<p>[...]<br />
You&#8217;ll need a form named frmProgress containing 4 labels (2 for messages and 2 for attachments)</p>
<p>And to distinguish inbox from outbox:</p>
<p>    If InStr(UCase$(olns.Application.ActiveExplorer.CurrentFolder.Name), &#8220;INVIATA&#8221;) &gt; 0 Then<br />
        msgFolder = RootFolder &amp; &#8220;@inviata\\&#8221; &amp; msgFolder &amp; &#8220;\\&#8221;<br />
    Else<br />
        msgFolder = RootFolder &amp; msgFolder &amp; &#8220;\\&#8221;<br />
    End If</p>
<p>(but this is not portable fordifferenet languages, you must specify proper name for your outbox)</p>
<p>I put the &#8220;@&#8221; in front of folder name to have it always as first item listed in alphabetical order.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jumpjack</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8858</link>
		<dc:creator>jumpjack</dc:creator>
		<pubDate>Mon, 14 Sep 2009 07:54:53 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8858</guid>
		<description>Fantastic macro! I have been looking for it (and trying to write it by myself...) for months!
You saved me a lot of work, thank you very much.
I think project is mature enough to pass to googlecode for proper versioning, now... :-) (just to keeptrack of changes made to original project).

Apart from this, I think it could be useful to get the macro creating separate folders for inbox and outbox. To keep compatibility with current version, it could just create a separate folder for outbox, keeping inbox attachment in main folder.</description>
		<content:encoded><![CDATA[<p>Fantastic macro! I have been looking for it (and trying to write it by myself&#8230;) for months!<br />
You saved me a lot of work, thank you very much.<br />
I think project is mature enough to pass to googlecode for proper versioning, now&#8230; <img src='http://manage-this.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  (just to keeptrack of changes made to original project).</p>
<p>Apart from this, I think it could be useful to get the macro creating separate folders for inbox and outbox. To keep compatibility with current version, it could just create a separate folder for outbox, keeping inbox attachment in main folder.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8857</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Mon, 14 Sep 2009 04:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8857</guid>
		<description>Dan -

I&#039;m not sure why you are seeing this behavior.   I&#039;m able to adjust the THRESH constant and the macro skips messages smaller than that value.  Maybe you could try hard-coding a threshold instead of using the constant.  To do this, modify this line:
&lt;code&gt;If (objMsg.Size &lt; (1024 * THRESH)) Then&lt;/code&gt;
-Carl</description>
		<content:encoded><![CDATA[<p>Dan -</p>
<p>I&#8217;m not sure why you are seeing this behavior.   I&#8217;m able to adjust the THRESH constant and the macro skips messages smaller than that value.  Maybe you could try hard-coding a threshold instead of using the constant.  To do this, modify this line:<br />
<code>If (objMsg.Size < (1024 * THRESH)) Then</code><br />
-Carl</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dan</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8838</link>
		<dc:creator>dan</dc:creator>
		<pubDate>Sat, 12 Sep 2009 18:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8838</guid>
		<description>Carl,
fantastic macro..does exactly what I used to be able to with lotus notes, the only problem I keep running into is that when modifying the threshold for the message size..no matter what I seem to specify, it is still archiving smaller attachments.
right now it is set to: Const THRESH As Long = 5 &#039;kb but seems to do the same no matter what I change it to</description>
		<content:encoded><![CDATA[<p>Carl,<br />
fantastic macro..does exactly what I used to be able to with lotus notes, the only problem I keep running into is that when modifying the threshold for the message size..no matter what I seem to specify, it is still archiving smaller attachments.<br />
right now it is set to: Const THRESH As Long = 5 &#8216;kb but seems to do the same no matter what I change it to</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8644</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Fri, 28 Aug 2009 02:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8644</guid>
		<description>Dennis -

There are several use cases, depending on how you prefer to work.  With the modifications you made, you can strip attachments from your calendar items and probably go a year or more without having to clean anything out.

Also, as you mentioned, there is a performance hit from large fragmented PST files.  It is a database, after all.  Even though the PST size limit was significantly increased starting in OL2003, many people still recommend keeping your PST files below 2GB.  There is some information on allowable PST sizes &lt;a href=&quot;http://support.microsoft.com/kb/830336&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;, and some nice recommendations on how to speed up Outlook performance in general &lt;a href=&quot;http://www.clearcontext.com/help/performance.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.

Another use case is for messages in the Inbox.  If you have a message with a large attachment but aren&#039;t ready to move it offline yet, you can convert the attachment to a link.  Also, if you are going to convert an email into a task, it&#039;s a good idea to strip the attachments first since the task will likely take up space on your central server.

-Carl</description>
		<content:encoded><![CDATA[<p>Dennis -</p>
<p>There are several use cases, depending on how you prefer to work.  With the modifications you made, you can strip attachments from your calendar items and probably go a year or more without having to clean anything out.</p>
<p>Also, as you mentioned, there is a performance hit from large fragmented PST files.  It is a database, after all.  Even though the PST size limit was significantly increased starting in OL2003, many people still recommend keeping your PST files below 2GB.  There is some information on allowable PST sizes <a href="http://support.microsoft.com/kb/830336">here</a>, and some nice recommendations on how to speed up Outlook performance in general <a href="http://www.clearcontext.com/help/performance.html">here</a>.</p>
<p>Another use case is for messages in the Inbox.  If you have a message with a large attachment but aren&#8217;t ready to move it offline yet, you can convert the attachment to a link.  Also, if you are going to convert an email into a task, it&#8217;s a good idea to strip the attachments first since the task will likely take up space on your central server.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8641</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Thu, 27 Aug 2009 23:00:09 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8641</guid>
		<description>Hmm, so what is the use case for stripping attachments out? To cut down on PST size? How does PST size affect Outlook performance?</description>
		<content:encoded><![CDATA[<p>Hmm, so what is the use case for stripping attachments out? To cut down on PST size? How does PST size affect Outlook performance?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8617</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Thu, 27 Aug 2009 03:08:33 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8617</guid>
		<description>Dennis -

Sounds like you got it.  That is pretty much what I would have recommended, and I wouldn&#039;t have thought of the HTMLBody change without trying it.  Nice work.

I would say that even with attachment stripping, eventually your calendar will still need to be cleaned out.  You *can* archive calendar items in your PST along side your mail items.  Here are the steps I follow (about once every 3 months).  These are for OL2003, so there may be slight differences in OL2007....  

(1) Create a new folder in your PST and select &quot;Calendar Items&quot; instead of &quot;Mail and Post Items&quot; during the creation process.  You can name it something like &quot;Calendar Archive 2009&quot;

(2) Go to your main calendar, then select View &gt; Arrange By &gt; Current View &gt; Events.  This should give you a list of calendar items instead of the calendar view.

(3) Sort by &quot;Recurrence Range End&quot; with the oldest items at the top.  If Recurrence Range End is not a column, you will need to add it via the Field Chooser.  This sort allows you to select meetings which are no longer needed without having to worry about losing recurring meetings.

(4) Select any meetings that have a Recurrence Range End that is more than a month old and drag them to the PST folder you created.  For meeting you created, you may get a warning that says meeting responses will no longer be tracker.  Just keep click OK until all the items are moved.  If you are viewing the calendar items in groups, you will have to repeat this for each group.

(5) Reset your view back to Day/Week/Month (or whatever you prefer).

That&#039;s it.  I like to keep about 1 month of history in the main calendar.  The other nice thing is that calendar items in the archive folder are still indexed by desktop search (WDS or GDS), so they turn up in your search results just like always.

It wouldn&#039;t be hard to create a macro that selects any calendar items with Recurrence Range End older than N days and moves them to the Calendar Archive folder.  That one is on my to-do list, I just haven&#039;t gotten around to it yet ;-)

-Carl</description>
		<content:encoded><![CDATA[<p>Dennis -</p>
<p>Sounds like you got it.  That is pretty much what I would have recommended, and I wouldn&#8217;t have thought of the HTMLBody change without trying it.  Nice work.</p>
<p>I would say that even with attachment stripping, eventually your calendar will still need to be cleaned out.  You *can* archive calendar items in your PST along side your mail items.  Here are the steps I follow (about once every 3 months).  These are for OL2003, so there may be slight differences in OL2007&#8230;.  </p>
<p>(1) Create a new folder in your PST and select &#8220;Calendar Items&#8221; instead of &#8220;Mail and Post Items&#8221; during the creation process.  You can name it something like &#8220;Calendar Archive 2009&#8243;</p>
<p>(2) Go to your main calendar, then select View > Arrange By > Current View > Events.  This should give you a list of calendar items instead of the calendar view.</p>
<p>(3) Sort by &#8220;Recurrence Range End&#8221; with the oldest items at the top.  If Recurrence Range End is not a column, you will need to add it via the Field Chooser.  This sort allows you to select meetings which are no longer needed without having to worry about losing recurring meetings.</p>
<p>(4) Select any meetings that have a Recurrence Range End that is more than a month old and drag them to the PST folder you created.  For meeting you created, you may get a warning that says meeting responses will no longer be tracker.  Just keep click OK until all the items are moved.  If you are viewing the calendar items in groups, you will have to repeat this for each group.</p>
<p>(5) Reset your view back to Day/Week/Month (or whatever you prefer).</p>
<p>That&#8217;s it.  I like to keep about 1 month of history in the main calendar.  The other nice thing is that calendar items in the archive folder are still indexed by desktop search (WDS or GDS), so they turn up in your search results just like always.</p>
<p>It wouldn&#8217;t be hard to create a macro that selects any calendar items with Recurrence Range End older than N days and moves them to the Calendar Archive folder.  That one is on my to-do list, I just haven&#8217;t gotten around to it yet <img src='http://manage-this.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8607</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Wed, 26 Aug 2009 17:23:35 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8607</guid>
		<description>Well I have enough hacks in to provide basic support for Appointment items. I need to clean things up (big time)  but I made the following changes:

- I replaced &quot;If objMsg.Class = olMail Then&quot; by &quot;If 1 Then&quot; to let all objects through

- For non-MailItem objects, I set msgSender to &quot;&quot; since the SenderName doesn&#039;t exist for some of those other objects (such as AppoitmentItem objects)

- I Used CreationTime instead of ReceivedTime (which doesn&#039;t exist for AppointmentItem objects)

- I utilized objMsg.HTMLBody only for MailItem objects. The other objects will use Obj.Body</description>
		<content:encoded><![CDATA[<p>Well I have enough hacks in to provide basic support for Appointment items. I need to clean things up (big time)  but I made the following changes:</p>
<p>- I replaced &#8220;If objMsg.Class = olMail Then&#8221; by &#8220;If 1 Then&#8221; to let all objects through</p>
<p>- For non-MailItem objects, I set msgSender to &#8220;&#8221; since the SenderName doesn&#8217;t exist for some of those other objects (such as AppoitmentItem objects)</p>
<p>- I Used CreationTime instead of ReceivedTime (which doesn&#8217;t exist for AppointmentItem objects)</p>
<p>- I utilized objMsg.HTMLBody only for MailItem objects. The other objects will use Obj.Body</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8605</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Wed, 26 Aug 2009 14:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8605</guid>
		<description>This macro works well for me but I can&#039;t get it to work on calendar items. For our use, that is most important.

We have storage quotas on our exchange server. Normal mail items I can easily move off to a PST file but it is very helpful to keep the calendar entirely on the exchange server. Attachments to calendar items eats up that quota very quickly.

Any ideas?</description>
		<content:encoded><![CDATA[<p>This macro works well for me but I can&#8217;t get it to work on calendar items. For our use, that is most important.</p>
<p>We have storage quotas on our exchange server. Normal mail items I can easily move off to a PST file but it is very helpful to keep the calendar entirely on the exchange server. Attachments to calendar items eats up that quota very quickly.</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8476</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Wed, 19 Aug 2009 04:54:43 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8476</guid>
		<description>Mariane - Thanks for your comments, glad to hear that it worked!</description>
		<content:encoded><![CDATA[<p>Mariane &#8211; Thanks for your comments, glad to hear that it worked!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mariane</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8470</link>
		<dc:creator>Mariane</dc:creator>
		<pubDate>Tue, 18 Aug 2009 23:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8470</guid>
		<description>By the way, I use Office 2007.
Thanks again!</description>
		<content:encoded><![CDATA[<p>By the way, I use Office 2007.<br />
Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mariane</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8469</link>
		<dc:creator>Mariane</dc:creator>
		<pubDate>Tue, 18 Aug 2009 23:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8469</guid>
		<description>Hi Carl, fantastic and useful tool!  I just installed it in VISTA 64x, by the very same method you described in the post.  Works like a charm! Thank you!</description>
		<content:encoded><![CDATA[<p>Hi Carl, fantastic and useful tool!  I just installed it in VISTA 64x, by the very same method you described in the post.  Works like a charm! Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8283</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Tue, 11 Aug 2009 22:39:31 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8283</guid>
		<description>Michael -

Thanks for the detailed suggestions!  I&#039;ll check them out and probably fold them into the original code.  One comment on this line:  &lt;code&gt;msgFolder = Left(RootFolder &amp; msgFolder &amp; &quot;\\&quot;, 150)&lt;/code&gt;  If the &quot;\\&quot; is really needed, it might get truncated.  I&#039;ll have to check that... Maybe instead something like this to preserve the ending:

&lt;code&gt;msgFolder = Left(RootFolder &amp; msgFolder, 148) &amp; &quot;\\&quot;&lt;/code&gt;

Anyway, thanks again for the suggestions!

-Carl</description>
		<content:encoded><![CDATA[<p>Michael -</p>
<p>Thanks for the detailed suggestions!  I&#8217;ll check them out and probably fold them into the original code.  One comment on this line:  <code>msgFolder = Left(RootFolder &#038; msgFolder &#038; "\\", 150)</code>  If the &#8220;\\&#8221; is really needed, it might get truncated.  I&#8217;ll have to check that&#8230; Maybe instead something like this to preserve the ending:</p>
<p><code>msgFolder = Left(RootFolder &#038; msgFolder, 148) &#038; "\\"</code></p>
<p>Anyway, thanks again for the suggestions!</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8227</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Mon, 10 Aug 2009 07:13:54 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8227</guid>
		<description>Great macro!

I noticed that this was said before, but it can happen sometimes that the macro runs into an error like &lt;i&gt;Path not found&lt;/i&gt; or something like that due to the path name limitation to 256 chars. Therefore I made some changes to my local copy.

First, I replaced
&lt;code&gt;
attFileName = objAttachments.Item(i).FileName
attPath = msgFolder &amp; &quot;\\&quot; &amp; attFileName
&lt;/code&gt;

by

&lt;code&gt;
Dim dotPos As Integer
attFileName = objAttachments.Item(i).FileName
Do
    attPath = msgFolder &amp; &quot;\\&quot; &amp; attFileName
    If Len(attPath) &gt; 256 Then
        dotPos = InStrRev(attFileName, &quot;.&quot;)
        If dotPos = 0 Then
            attFileName = Left(attFileName, Len(attFileName) - 1)
        Else
            attFileName = Left(attFileName, dotPos - 2) &amp; &quot;.&quot; &amp; Mid(attFileName, dotPos + 1)
        End If
    Else
        Exit Do
    End If
Loop
&lt;/code&gt;

and then

&lt;code&gt;
msgFolder = RootFolder &amp; msgFolder &amp; &quot;\\&quot;
&lt;/code&gt;

by

&lt;code&gt;
msgFolder = Left(RootFolder &amp; msgFolder &amp; &quot;\\&quot;, 150)
&lt;/code&gt;

Next, i noticed that someone sent me an email with a TAB character in the subject, which also caused an error. To catch this, I inserted this character in the invalid character list, so I exchanged 

&lt;code&gt;
invalidChars = Array(&quot;\&quot;, &quot;/&quot;, &quot;:&quot;, &quot;*&quot;, &quot;?&quot;, &quot;&quot;&quot;&quot;, &quot;&quot;, &quot;&#124;&quot;, &quot;…&quot;)
&lt;/code&gt;

by

&lt;code&gt;
invalidChars = Array(&quot;\&quot;, &quot;/&quot;, &quot;:&quot;, &quot;*&quot;, &quot;?&quot;, &quot;&quot;&quot;&quot;, &quot;&quot;, &quot;&#124;&quot;, &quot;…&quot;, Chr(9))
&lt;/code&gt;

-Michael</description>
		<content:encoded><![CDATA[<p>Great macro!</p>
<p>I noticed that this was said before, but it can happen sometimes that the macro runs into an error like <i>Path not found</i> or something like that due to the path name limitation to 256 chars. Therefore I made some changes to my local copy.</p>
<p>First, I replaced<br />
<code><br />
attFileName = objAttachments.Item(i).FileName<br />
attPath = msgFolder &amp; "\\" &amp; attFileName<br />
</code></p>
<p>by</p>
<p><code><br />
Dim dotPos As Integer<br />
attFileName = objAttachments.Item(i).FileName<br />
Do<br />
    attPath = msgFolder &amp; "\\" &amp; attFileName<br />
    If Len(attPath) &gt; 256 Then<br />
        dotPos = InStrRev(attFileName, ".")<br />
        If dotPos = 0 Then<br />
            attFileName = Left(attFileName, Len(attFileName) - 1)<br />
        Else<br />
            attFileName = Left(attFileName, dotPos - 2) &amp; "." &amp; Mid(attFileName, dotPos + 1)<br />
        End If<br />
    Else<br />
        Exit Do<br />
    End If<br />
Loop<br />
</code></p>
<p>and then</p>
<p><code><br />
msgFolder = RootFolder &amp; msgFolder &amp; "\\"<br />
</code></p>
<p>by</p>
<p><code><br />
msgFolder = Left(RootFolder &amp; msgFolder &amp; "\\", 150)<br />
</code></p>
<p>Next, i noticed that someone sent me an email with a TAB character in the subject, which also caused an error. To catch this, I inserted this character in the invalid character list, so I exchanged </p>
<p><code><br />
invalidChars = Array("\", "/", ":", "*", "?", """", "", "|", "…")<br />
</code></p>
<p>by</p>
<p><code><br />
invalidChars = Array("\", "/", ":", "*", "?", """", "", "|", "…", Chr(9))<br />
</code></p>
<p>-Michael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8179</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Sat, 08 Aug 2009 15:08:49 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8179</guid>
		<description>Russ - To run the macro against the whole Inbox, select all (CTRL-A) and let &#039;er rip.  It could also be made to run recursively through a set of sub folders, but that would require a fair amount of additional code.  There may be some examples on &lt;a href=&quot;http://www.outlookcode.com/&quot; rel=&quot;nofollow&quot;&gt;Sue Mosher&#039;s site&lt;/a&gt;, but it would be a significant re-write.

-Carl</description>
		<content:encoded><![CDATA[<p>Russ &#8211; To run the macro against the whole Inbox, select all (CTRL-A) and let &#8216;er rip.  It could also be made to run recursively through a set of sub folders, but that would require a fair amount of additional code.  There may be some examples on <a href="http://www.outlookcode.com/">Sue Mosher&#8217;s site</a>, but it would be a significant re-write.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russ</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8150</link>
		<dc:creator>Russ</dc:creator>
		<pubDate>Thu, 06 Aug 2009 20:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8150</guid>
		<description>Is there a way to run the macro against the whole mailbox or multiple folders\subfolders at once without going through each folder and selecting the items manually?</description>
		<content:encoded><![CDATA[<p>Is there a way to run the macro against the whole mailbox or multiple folders\subfolders at once without going through each folder and selecting the items manually?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-8001</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Thu, 30 Jul 2009 03:03:56 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-8001</guid>
		<description>Mark -

To answer your first question: Yes, just select multiple messages before launching the macro and it will step through each one stripping the attachments and inserting links.  After that, you&#039;ll want to select Properties for your PST file, go to Advanced, click the &quot;Compact Now&quot; button, then go out and get a coffee while it crunches on the file.

On your second question, this error may be causing the macro to stop after the first message is processed.  Look at the message after processing... Does it now have an attachment named &quot;Attachments Removed&quot; or are there no attachments at all?

-Carl</description>
		<content:encoded><![CDATA[<p>Mark -</p>
<p>To answer your first question: Yes, just select multiple messages before launching the macro and it will step through each one stripping the attachments and inserting links.  After that, you&#8217;ll want to select Properties for your PST file, go to Advanced, click the &#8220;Compact Now&#8221; button, then go out and get a coffee while it crunches on the file.</p>
<p>On your second question, this error may be causing the macro to stop after the first message is processed.  Look at the message after processing&#8230; Does it now have an attachment named &#8220;Attachments Removed&#8221; or are there no attachments at all?</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7950</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Mon, 27 Jul 2009 18:01:06 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7950</guid>
		<description>Sorry for multiple comments...I keep getting  an error that says the path does not exist, but it is removing the attachments and saving them. When I click away and back to the message it shows the attachement was removed.</description>
		<content:encoded><![CDATA[<p>Sorry for multiple comments&#8230;I keep getting  an error that says the path does not exist, but it is removing the attachments and saving them. When I click away and back to the message it shows the attachement was removed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7949</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Mon, 27 Jul 2009 17:56:38 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7949</guid>
		<description>Is there a way for this to be run on several messages at the same time? I&#039;m trying to go back and clean out my old emails before I reformat and reinstall XP and everything else. I&#039;d like my .pst file to be small and clean when I do that, and this is rather time consuming as I have several years of emails I&#039;m cleaning up.

Thanks!</description>
		<content:encoded><![CDATA[<p>Is there a way for this to be run on several messages at the same time? I&#8217;m trying to go back and clean out my old emails before I reformat and reinstall XP and everything else. I&#8217;d like my .pst file to be small and clean when I do that, and this is rather time consuming as I have several years of emails I&#8217;m cleaning up.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7834</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Tue, 21 Jul 2009 04:55:37 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7834</guid>
		<description>Mary -

What you are describing can probably be done, but it is something different than what this macro is intended to do.  In your case you would probably need to replace the &quot;Reply&quot; button in the explorer toolbar and on the message toolbar with your own homemade reply function that retrieves the attachment names in the current message and appends them to the reply.

Otherwise, your user can select Forward instead, then manually paste names into the TO: and CC: fields and manually change the subject prefix from &quot;FW&quot; to &quot;RE&quot;.

-Carl</description>
		<content:encoded><![CDATA[<p>Mary -</p>
<p>What you are describing can probably be done, but it is something different than what this macro is intended to do.  In your case you would probably need to replace the &#8220;Reply&#8221; button in the explorer toolbar and on the message toolbar with your own homemade reply function that retrieves the attachment names in the current message and appends them to the reply.</p>
<p>Otherwise, your user can select Forward instead, then manually paste names into the TO: and CC: fields and manually change the subject prefix from &#8220;FW&#8221; to &#8220;RE&#8221;.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mary</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7829</link>
		<dc:creator>Mary</dc:creator>
		<pubDate>Mon, 20 Jul 2009 20:28:31 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7829</guid>
		<description>Hi - I&#039;m not a programmer, so I&#039;m hoping you can help me out. Our company just switched from Lotus Notes to Outlook, and I have a user asking whether one feature in Notes can be replicated in Outlook. This feature is that when an email containing an attachment has been forwarded or replied to *without* the attachment, a notice appears at the bottom of the email noting that &quot;attachment [filename] was removed by [username].&quot; This lets future readers know an attachment was originally part of the email, and what it was called, so they can go back and locate it. Since Outlook defaults to replying without the attachment, my user really misses this feature. Any chance your code above could be modified to perform this function? And if so, could you please also post instructions on how to incorporate the code into Outlook? Thank you very much in advance!</description>
		<content:encoded><![CDATA[<p>Hi &#8211; I&#8217;m not a programmer, so I&#8217;m hoping you can help me out. Our company just switched from Lotus Notes to Outlook, and I have a user asking whether one feature in Notes can be replicated in Outlook. This feature is that when an email containing an attachment has been forwarded or replied to *without* the attachment, a notice appears at the bottom of the email noting that &#8220;attachment [filename] was removed by [username].&#8221; This lets future readers know an attachment was originally part of the email, and what it was called, so they can go back and locate it. Since Outlook defaults to replying without the attachment, my user really misses this feature. Any chance your code above could be modified to perform this function? And if so, could you please also post instructions on how to incorporate the code into Outlook? Thank you very much in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7795</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Fri, 17 Jul 2009 20:41:31 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7795</guid>
		<description>Andy - Good catch!  I&#039;m not seeing the same error message you describe, but I am having path names get cut off unexpectedly on test messages with extremely long subjects.  I believe the WinXP limit is 256 chars, so I&#039;m not sure why the path names are being truncated.  Could be some limitation in Outlook&#039;s VBA.

Anyway, I&#039;ll post an updated macro when I get a chance.  In the mean time, you can insert the following line right after the &quot;msgSubject = Trim(msgSubject)&quot; line:

msgSubject = Left(msgSubject, 60)

This will limit the subject length to the first 60 chars.  Since the sender name as well as the date also ends up in the path name, I picked 60 chars in order to keep the whole thing under 90.

Hope that helps!

-Carl</description>
		<content:encoded><![CDATA[<p>Andy &#8211; Good catch!  I&#8217;m not seeing the same error message you describe, but I am having path names get cut off unexpectedly on test messages with extremely long subjects.  I believe the WinXP limit is 256 chars, so I&#8217;m not sure why the path names are being truncated.  Could be some limitation in Outlook&#8217;s VBA.</p>
<p>Anyway, I&#8217;ll post an updated macro when I get a chance.  In the mean time, you can insert the following line right after the &#8220;msgSubject = Trim(msgSubject)&#8221; line:</p>
<p>msgSubject = Left(msgSubject, 60)</p>
<p>This will limit the subject length to the first 60 chars.  Since the sender name as well as the date also ends up in the path name, I picked 60 chars in order to keep the whole thing under 90.</p>
<p>Hope that helps!</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andy</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7782</link>
		<dc:creator>andy</dc:creator>
		<pubDate>Wed, 15 Jul 2009 12:53:10 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7782</guid>
		<description>Hi Carl,

This is a fantastic script !

However i noticed that every now and again the script would give a 

&quot; RemoveAttachment() Subroutine     Error Code: 
-2147467259      The operation failed&quot;  

error on certain emails with attachments.

After a lot of testing i&#039;ve found that the problem occurs when the email subject title goes over 90characters.  Below 90 and all is fine.  Above 90 and you get the error stated above.  Is there some way to either extend this character limit or if not - check for the subject title length and if over 90chars - chop a little off ?

all the very best</description>
		<content:encoded><![CDATA[<p>Hi Carl,</p>
<p>This is a fantastic script !</p>
<p>However i noticed that every now and again the script would give a </p>
<p>&#8221; RemoveAttachment() Subroutine     Error Code:<br />
-2147467259      The operation failed&#8221;  </p>
<p>error on certain emails with attachments.</p>
<p>After a lot of testing i&#8217;ve found that the problem occurs when the email subject title goes over 90characters.  Below 90 and all is fine.  Above 90 and you get the error stated above.  Is there some way to either extend this character limit or if not &#8211; check for the subject title length and if over 90chars &#8211; chop a little off ?</p>
<p>all the very best</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7733</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Wed, 08 Jul 2009 19:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7733</guid>
		<description>&lt;b&gt;Colin -&lt;/b&gt; Not sure what could be causing that.  Sometimes non-standard characters in either the message subject or attachment file name can cause errors, although most of those are already stripped out by the macro. I would recommend adding a few “MsgBox” commands at various points in the code so you can see how far it is getting before it exits. You can also comment out the “On Error GoTo ErrorHandler” line so that the VBA Macro debugger can take you to the exact line of the code when it stops.

&lt;b&gt;cHRISrs -&lt;/b&gt; Yes, the &quot;Attachments Removed&quot; file is not zero bytes.  For messages with stripped attachments, I wanted the paperclip icon to still show up in Outlook for sorting &amp; filtering.  Adding a very small attachment was the only reliable way to preserve that.  The attachment was created by making a zero-character file in note pad and naming it &quot;Attachments Removed&quot; without the .txt extension.  Having this attachment also allows you to still search on messages with attachments in WDS or GDS.   To answer your second question about skipping smaller files, the macro does this automatically now and you can set the threshold to whatever you like.  My thinking is that a prompt on every message could get to be annoying after a while.

&lt;b&gt;Ken -&lt;/b&gt; You could definitely modify the macro to do that.  The subject is in objMsg.Subject.  You could wrap the macro in an If statement and use some string functions to compare only the first (leftmost) 15 characters of the subject with your desired string.  Alternatively, you could check the subject via an Outlook rule, then use the rule to run the macro on incoming messages (see comments above from 21-Jun-09).  When the SaveAsFile command launches, it will overwrite the previous files if the pathname and filename are the same.  The macro appends a date stamp to the pathname to prevent this from happening, so just remove that portion from the code above if you want files to be overwritten.

-Carl</description>
		<content:encoded><![CDATA[<p><b>Colin -</b> Not sure what could be causing that.  Sometimes non-standard characters in either the message subject or attachment file name can cause errors, although most of those are already stripped out by the macro. I would recommend adding a few “MsgBox” commands at various points in the code so you can see how far it is getting before it exits. You can also comment out the “On Error GoTo ErrorHandler” line so that the VBA Macro debugger can take you to the exact line of the code when it stops.</p>
<p><b>cHRISrs -</b> Yes, the &#8220;Attachments Removed&#8221; file is not zero bytes.  For messages with stripped attachments, I wanted the paperclip icon to still show up in Outlook for sorting &#038; filtering.  Adding a very small attachment was the only reliable way to preserve that.  The attachment was created by making a zero-character file in note pad and naming it &#8220;Attachments Removed&#8221; without the .txt extension.  Having this attachment also allows you to still search on messages with attachments in WDS or GDS.   To answer your second question about skipping smaller files, the macro does this automatically now and you can set the threshold to whatever you like.  My thinking is that a prompt on every message could get to be annoying after a while.</p>
<p><b>Ken -</b> You could definitely modify the macro to do that.  The subject is in objMsg.Subject.  You could wrap the macro in an If statement and use some string functions to compare only the first (leftmost) 15 characters of the subject with your desired string.  Alternatively, you could check the subject via an Outlook rule, then use the rule to run the macro on incoming messages (see comments above from 21-Jun-09).  When the SaveAsFile command launches, it will overwrite the previous files if the pathname and filename are the same.  The macro appends a date stamp to the pathname to prevent this from happening, so just remove that portion from the code above if you want files to be overwritten.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7724</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Tue, 07 Jul 2009 14:19:42 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7724</guid>
		<description>Can I strip the attachment from a sender that the subject line&#039;s first 15 characters are always the same and save the file to whatever location with a same file name overwriting previous files?</description>
		<content:encoded><![CDATA[<p>Can I strip the attachment from a sender that the subject line&#8217;s first 15 characters are always the same and save the file to whatever location with a same file name overwriting previous files?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cHRISrs</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7709</link>
		<dc:creator>cHRISrs</dc:creator>
		<pubDate>Sun, 05 Jul 2009 23:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7709</guid>
		<description>Thanks! 

I addd the &quot;File Removed&quot; attachment process to a VBA macro I developed for atachment processing. I outlook 2007 it shows as a 6 kb file and addes to the size of the message (5 or 6 kb) Is this your experiance?

I am trying to update my VBA routine to skip embeded images, etc. As you say, they are generally logos, etc that should stay in the message. For me the actual attachments are job related materials that need to be saved in job folders, regardless of size. It seems to me that for smaller files I will need to step through and prompt as to wheteher to save or not. Any thoughts? generally the</description>
		<content:encoded><![CDATA[<p>Thanks! </p>
<p>I addd the &#8220;File Removed&#8221; attachment process to a VBA macro I developed for atachment processing. I outlook 2007 it shows as a 6 kb file and addes to the size of the message (5 or 6 kb) Is this your experiance?</p>
<p>I am trying to update my VBA routine to skip embeded images, etc. As you say, they are generally logos, etc that should stay in the message. For me the actual attachments are job related materials that need to be saved in job folders, regardless of size. It seems to me that for smaller files I will need to step through and prompt as to wheteher to save or not. Any thoughts? generally the</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7704</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Sun, 05 Jul 2009 09:45:52 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7704</guid>
		<description>This is exactly what I have been looking for. I am running it on Outlook 2007 and overall it works fine. Sometimes however I&#039;m getting an error RemoveAttachments() Subroutine   Error Code: -2147467259 The operation failed.

This seems to be related to specific messages and if I skip these ones its works fine. I can&#039;t seem to find what the error is. Any ideas?

Colin</description>
		<content:encoded><![CDATA[<p>This is exactly what I have been looking for. I am running it on Outlook 2007 and overall it works fine. Sometimes however I&#8217;m getting an error RemoveAttachments() Subroutine   Error Code: -2147467259 The operation failed.</p>
<p>This seems to be related to specific messages and if I skip these ones its works fine. I can&#8217;t seem to find what the error is. Any ideas?</p>
<p>Colin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7627</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Sun, 28 Jun 2009 18:13:43 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7627</guid>
		<description>Steven -

Nobody has reported this issue in the past, so not sure what might be causing it.  It might be something with the new folder (path) it is creating for each message.  Do you have any strange characters in the subject line that would not be valid in a folder name?  I would recommend adding a few &quot;MsgBox&quot; commands at various points in the code so you can see how far it is getting before it exits.  You can also comment out the &quot;On Error GoTo ErrorHandler&quot; line so that the VBA Macro debugger can take you to the exact line of the code when it stops.

Let me know what you find out from that, and I can probably provide some better suggestions.

-Carl</description>
		<content:encoded><![CDATA[<p>Steven -</p>
<p>Nobody has reported this issue in the past, so not sure what might be causing it.  It might be something with the new folder (path) it is creating for each message.  Do you have any strange characters in the subject line that would not be valid in a folder name?  I would recommend adding a few &#8220;MsgBox&#8221; commands at various points in the code so you can see how far it is getting before it exits.  You can also comment out the &#8220;On Error GoTo ErrorHandler&#8221; line so that the VBA Macro debugger can take you to the exact line of the code when it stops.</p>
<p>Let me know what you find out from that, and I can probably provide some better suggestions.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7626</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Sun, 28 Jun 2009 18:08:51 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7626</guid>
		<description>Matt -

Depending on which tool you use to extract the zip file, it may try to create the folders for you.  Basically, you have to have the &quot;Attachments Removed&quot; file in the &quot;config&quot; folder underneath whatever path you define in this line:

Const RootFolder = &quot;C:\\Outlook Attachments\\2009\\&quot;

Also note that the file has to have the name &quot;Attachments Removed&quot; with no .txt or other extension.

This should work on most messages.  The message size has to be greater than the threshold you set, and it will skip messages with OLE attachments (usually RTF messages).  For other formats, it will convert the message to HTML format and include the links.

Hope that helps.

-Carl</description>
		<content:encoded><![CDATA[<p>Matt -</p>
<p>Depending on which tool you use to extract the zip file, it may try to create the folders for you.  Basically, you have to have the &#8220;Attachments Removed&#8221; file in the &#8220;config&#8221; folder underneath whatever path you define in this line:</p>
<p>Const RootFolder = &#8220;C:\\Outlook Attachments\\2009\\&#8221;</p>
<p>Also note that the file has to have the name &#8220;Attachments Removed&#8221; with no .txt or other extension.</p>
<p>This should work on most messages.  The message size has to be greater than the threshold you set, and it will skip messages with OLE attachments (usually RTF messages).  For other formats, it will convert the message to HTML format and include the links.</p>
<p>Hope that helps.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steven mcpherson</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7608</link>
		<dc:creator>steven mcpherson</dc:creator>
		<pubDate>Fri, 26 Jun 2009 15:55:34 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7608</guid>
		<description>I am trying to use this code on Outlook 2003, Windows XP. It does work, however it always comes back with an error saying the path does not exist and it only strips out one attachment each time the code is run. Can you help? Thanks</description>
		<content:encoded><![CDATA[<p>I am trying to use this code on Outlook 2003, Windows XP. It does work, however it always comes back with an error saying the path does not exist and it only strips out one attachment each time the code is run. Can you help? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7598</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 25 Jun 2009 14:49:47 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7598</guid>
		<description>Hey Carl, 
Great code, but I&#039;m having some difficulties with the &quot;Attachments Removed&quot; file in the config folder. I&#039;m not quite sure how to get the file in the folder. I tried extracting it from the &quot;Email Attachments Stripper v1.3&quot; link you have above but when I extract it, it creates new folders. I tried creating a new txt document but that was also unsuccessful. Also, I&#039;m not seeing any links to the files in my email. I think it&#039;s because my emails are in plain text but I&#039;m not sure and I don&#039;t know how to get them into html.</description>
		<content:encoded><![CDATA[<p>Hey Carl,<br />
Great code, but I&#8217;m having some difficulties with the &#8220;Attachments Removed&#8221; file in the config folder. I&#8217;m not quite sure how to get the file in the folder. I tried extracting it from the &#8220;Email Attachments Stripper v1.3&#8243; link you have above but when I extract it, it creates new folders. I tried creating a new txt document but that was also unsuccessful. Also, I&#8217;m not seeing any links to the files in my email. I think it&#8217;s because my emails are in plain text but I&#8217;m not sure and I don&#8217;t know how to get them into html.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7556</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Mon, 22 Jun 2009 05:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7556</guid>
		<description>Praetor - Yes, that&#039;s defintely possible.  I have done similar things with other macros.  First, you have to re-structure the macro a bit.  You don&#039;t need to loop through multiple items in a selection since you will only be passing it one message at a time via an Outlook rule.  You also have to change the first line to accept a passed object.  Something like: Sub StripAttachments(objMsg As Outlook.MailItem).  Not sure, but you might have to also move the macro to the &quot;ThisOutlookSession&quot; page if it doesn&#039;t fire from the rule.

Once the macro is modified, you would create an Outlook rule that fired on each message and ran the macro on that message.  To prevent the macro from running all the time, you can build the logic into the Outlook rule to only trigger when a message contains attachments and is larger than a certain size.

Good luck!

-Carl</description>
		<content:encoded><![CDATA[<p>Praetor &#8211; Yes, that&#8217;s defintely possible.  I have done similar things with other macros.  First, you have to re-structure the macro a bit.  You don&#8217;t need to loop through multiple items in a selection since you will only be passing it one message at a time via an Outlook rule.  You also have to change the first line to accept a passed object.  Something like: Sub StripAttachments(objMsg As Outlook.MailItem).  Not sure, but you might have to also move the macro to the &#8220;ThisOutlookSession&#8221; page if it doesn&#8217;t fire from the rule.</p>
<p>Once the macro is modified, you would create an Outlook rule that fired on each message and ran the macro on that message.  To prevent the macro from running all the time, you can build the logic into the Outlook rule to only trigger when a message contains attachments and is larger than a certain size.</p>
<p>Good luck!</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: praetor</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7513</link>
		<dc:creator>praetor</dc:creator>
		<pubDate>Thu, 18 Jun 2009 06:53:49 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7513</guid>
		<description>Hi Carl,

very nice code. It works without problems.
One Question: Is it posibble to start the macro automaticly for every incoming mail? I think it must replace the &quot;objSelectedItems As Outlook.Selection&quot; with an other construction?

Greats 
praetor</description>
		<content:encoded><![CDATA[<p>Hi Carl,</p>
<p>very nice code. It works without problems.<br />
One Question: Is it posibble to start the macro automaticly for every incoming mail? I think it must replace the &#8220;objSelectedItems As Outlook.Selection&#8221; with an other construction?</p>
<p>Greats<br />
praetor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7257</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Tue, 19 May 2009 16:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7257</guid>
		<description>Alastair - I think you got it now.  As indicated in the comments, you can change this behavior by changing this line:

          Const THRESH As Long = 100 &#039;kb

For example, if you want to strip anything larger than 50kb, use:

          Const THRESH As Long = 50 &#039;kb

-Carl</description>
		<content:encoded><![CDATA[<p>Alastair &#8211; I think you got it now.  As indicated in the comments, you can change this behavior by changing this line:</p>
<p>          Const THRESH As Long = 100 &#8216;kb</p>
<p>For example, if you want to strip anything larger than 50kb, use:</p>
<p>          Const THRESH As Long = 50 &#8216;kb</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alastair</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7246</link>
		<dc:creator>Alastair</dc:creator>
		<pubDate>Tue, 19 May 2009 06:53:59 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7246</guid>
		<description>OK, forget previous comment. I was testing the macro on very small attachments. Now I&#039;ve skimmed through your code and can see that it skips the smaller attachments!

Great work, thanks....</description>
		<content:encoded><![CDATA[<p>OK, forget previous comment. I was testing the macro on very small attachments. Now I&#8217;ve skimmed through your code and can see that it skips the smaller attachments!</p>
<p>Great work, thanks&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alastair</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7244</link>
		<dc:creator>Alastair</dc:creator>
		<pubDate>Tue, 19 May 2009 06:22:13 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7244</guid>
		<description>Great idea but I can get it to work for a short while, then it stops working - no error messages, just doesn&#039;t work. I&#039;m using Outlook 2007.</description>
		<content:encoded><![CDATA[<p>Great idea but I can get it to work for a short while, then it stops working &#8211; no error messages, just doesn&#8217;t work. I&#8217;m using Outlook 2007.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7079</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Tue, 05 May 2009 03:42:57 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7079</guid>
		<description>Hi Karen -

The code is a VBA macro the runs on the client side, so yes, it requires an Outlook client to be open.  There may be options to do something similar with server-side scripting, but I have no experience there.  One thing you can easily do is create a client rule that passes each incoming message to the macro for immediate processing.  That would still require a client PC, but would be more automated.

Regarding your other question, it is definitely possible to have the macro copy the attachment without removing it from the message.  Simply find this line in the code: &quot;objAttachments.Item(i).Delete&quot; and comment it out by placing a single quote &#039; in front of the line.

Hope that helps.

-Carl</description>
		<content:encoded><![CDATA[<p>Hi Karen -</p>
<p>The code is a VBA macro the runs on the client side, so yes, it requires an Outlook client to be open.  There may be options to do something similar with server-side scripting, but I have no experience there.  One thing you can easily do is create a client rule that passes each incoming message to the macro for immediate processing.  That would still require a client PC, but would be more automated.</p>
<p>Regarding your other question, it is definitely possible to have the macro copy the attachment without removing it from the message.  Simply find this line in the code: &#8220;objAttachments.Item(i).Delete&#8221; and comment it out by placing a single quote &#8216; in front of the line.</p>
<p>Hope that helps.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karen</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-7072</link>
		<dc:creator>Karen</dc:creator>
		<pubDate>Mon, 04 May 2009 15:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-7072</guid>
		<description>Carl,

Nice code!  This is similar to what I have been looking for, would appreciate your help with the following. 

Does your code require the outlook client to be open?  Is there a way to run this at the server level?  

We&#039;re trying to build something to automatically detach .TXT files as they arrive, and save them to the appropriate folder, based on the inbound email address.  

Emails to blue@test.com should have their .txt attachments saved to the BLUE_inbound folder; emails to red@test.com should have their .txt attachments saved to the RED_inbound folder; 

Obviously, I don&#039;t want to have to have outlook clients &#039;open&#039; for this to run correctly.

My goal is to copy the .txt attachments, and place them somewhere where they can be processed on some regular basis.  As such, I actually don&#039;t want to strip them from the email; would rather copy the attachment out, and then move the email to a &#039;processed&#039; subfolder.

Any suggestions would be appreciated.  Best, Karen</description>
		<content:encoded><![CDATA[<p>Carl,</p>
<p>Nice code!  This is similar to what I have been looking for, would appreciate your help with the following. </p>
<p>Does your code require the outlook client to be open?  Is there a way to run this at the server level?  </p>
<p>We&#8217;re trying to build something to automatically detach .TXT files as they arrive, and save them to the appropriate folder, based on the inbound email address.  </p>
<p>Emails to <a href="mailto:blue@test.com">blue@test.com</a> should have their .txt attachments saved to the BLUE_inbound folder; emails to <a href="mailto:red@test.com">red@test.com</a> should have their .txt attachments saved to the RED_inbound folder; </p>
<p>Obviously, I don&#8217;t want to have to have outlook clients &#8216;open&#8217; for this to run correctly.</p>
<p>My goal is to copy the .txt attachments, and place them somewhere where they can be processed on some regular basis.  As such, I actually don&#8217;t want to strip them from the email; would rather copy the attachment out, and then move the email to a &#8216;processed&#8217; subfolder.</p>
<p>Any suggestions would be appreciated.  Best, Karen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-6566</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Fri, 20 Mar 2009 03:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-6566</guid>
		<description>Bobby - Now that I think about it, you may want to leave the msgFolder variable as-is and instead change &quot;RootFolder&quot;.  That way, if the user is stripping attachments from multiple emails at once, the files from each email will still be grouped inside their individual message folders.  You could have the RootFolder path defined by the user each time via the browse dialog.  Just a thought.  It depends on what behavior you want.

-Carl</description>
		<content:encoded><![CDATA[<p>Bobby &#8211; Now that I think about it, you may want to leave the msgFolder variable as-is and instead change &#8220;RootFolder&#8221;.  That way, if the user is stripping attachments from multiple emails at once, the files from each email will still be grouped inside their individual message folders.  You could have the RootFolder path defined by the user each time via the browse dialog.  Just a thought.  It depends on what behavior you want.</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carl</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-6561</link>
		<dc:creator>carl</dc:creator>
		<pubDate>Thu, 19 Mar 2009 14:19:37 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-6561</guid>
		<description>Hi Bobby... You are correct on the config path.  I wanted to make sure that the zero byte file could be easily found by the script.  Without that file, you loose the paperclip icon.  Not terrible, but it&#039;s nice to be able to filter on that column or even search for emails with attachments even after they are stripped.  It sounds like you have that part configured correctly now.

Regarding a prompt for the user to select a path, that is definitely possible.  First, you would need to prompt the user &lt;a href=&quot;http://www.outlookcode.com/threads.aspx?forumid=1&amp;messageid=22634&quot; rel=&quot;nofollow&quot;&gt;using something like this example&lt;/a&gt;.  You may find additional examples on &lt;a href=&quot;http://www.outlookcode.com/&quot; rel=&quot;nofollow&quot;&gt;Sue Mosher&#039;s site&lt;/a&gt;.  Then, you store that response in a variable.  

In the macro, the &quot;msgFolder&quot; variable is used as the save path.  Just delete or comment out all of the lines in the macro that build the message folder path and instead use the path that the user provided via the dialog box.  You may have to clean up the user response a little bit.  For a first test, I would use the MsgBox command to display the contents of the msgFolder variable before trying to use it to write files.

Hope that helps, good luck!

-Carl</description>
		<content:encoded><![CDATA[<p>Hi Bobby&#8230; You are correct on the config path.  I wanted to make sure that the zero byte file could be easily found by the script.  Without that file, you loose the paperclip icon.  Not terrible, but it&#8217;s nice to be able to filter on that column or even search for emails with attachments even after they are stripped.  It sounds like you have that part configured correctly now.</p>
<p>Regarding a prompt for the user to select a path, that is definitely possible.  First, you would need to prompt the user <a href="http://www.outlookcode.com/threads.aspx?forumid=1&#038;messageid=22634">using something like this example</a>.  You may find additional examples on <a href="http://www.outlookcode.com/">Sue Mosher&#8217;s site</a>.  Then, you store that response in a variable.  </p>
<p>In the macro, the &#8220;msgFolder&#8221; variable is used as the save path.  Just delete or comment out all of the lines in the macro that build the message folder path and instead use the path that the user provided via the dialog box.  You may have to clean up the user response a little bit.  For a first test, I would use the MsgBox command to display the contents of the msgFolder variable before trying to use it to write files.</p>
<p>Hope that helps, good luck!</p>
<p>-Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bobby</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-6542</link>
		<dc:creator>Bobby</dc:creator>
		<pubDate>Tue, 17 Mar 2009 18:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-6542</guid>
		<description>Ok. I found by reading the code that I needed to some additional setup.  I needed to create a folder called &quot;Config&quot; under the root directory, the path looks like this &quot;C:\Outlook Attachments\2009\Config&quot; and place a zero byte file called &quot;Attachments Removed&quot; in that folder.  After doing both of these, no more errors.

I do have a followup question though.  Is it possible to change the script to prompt the user for an existing folder path to store the attachment?  For example, I have a folder called &quot;Projects&quot; in My Documents with various Sub-folders representing the separate projects.  I would like to detach the attachments to particular folders instead of always saving to the same file path.  What would I need to do to change the code to prompt for a folder to save the file(s)?</description>
		<content:encoded><![CDATA[<p>Ok. I found by reading the code that I needed to some additional setup.  I needed to create a folder called &#8220;Config&#8221; under the root directory, the path looks like this &#8220;C:\Outlook Attachments\2009\Config&#8221; and place a zero byte file called &#8220;Attachments Removed&#8221; in that folder.  After doing both of these, no more errors.</p>
<p>I do have a followup question though.  Is it possible to change the script to prompt the user for an existing folder path to store the attachment?  For example, I have a folder called &#8220;Projects&#8221; in My Documents with various Sub-folders representing the separate projects.  I would like to detach the attachments to particular folders instead of always saving to the same file path.  What would I need to do to change the code to prompt for a folder to save the file(s)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bobby</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-6541</link>
		<dc:creator>Bobby</dc:creator>
		<pubDate>Tue, 17 Mar 2009 16:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-6541</guid>
		<description>Carl,
This is exactly what I have been looking for to manage the size of my Outlook PST.  Our company limits the PST file size to 200MB.  As soon as you are over the limit, you can no longer send emails until you reduce the size.   

The only problem I have is that I keep getting an error message each time I execute the macro.  Even though I get the error message, the attachments are stripped, put into the C:\drive, the links are created in the email, and the *.txt file of the message is created.  Just seems odd that I get the error message each time.  

Is there something I missed in the setup?

RemoveAttachments() Subroutine

Error Code: -2044264445 (code varies each time I execute)
Path does not exist. Make sure the path is correct.</description>
		<content:encoded><![CDATA[<p>Carl,<br />
This is exactly what I have been looking for to manage the size of my Outlook PST.  Our company limits the PST file size to 200MB.  As soon as you are over the limit, you can no longer send emails until you reduce the size.   </p>
<p>The only problem I have is that I keep getting an error message each time I execute the macro.  Even though I get the error message, the attachments are stripped, put into the C:\drive, the links are created in the email, and the *.txt file of the message is created.  Just seems odd that I get the error message each time.  </p>
<p>Is there something I missed in the setup?</p>
<p>RemoveAttachments() Subroutine</p>
<p>Error Code: -2044264445 (code varies each time I execute)<br />
Path does not exist. Make sure the path is correct.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manage This! &#187; Blog Archive &#187; Bending OneNote and Outlook to Fit my GTD System</title>
		<link>http://manage-this.com/strip-outlook-attachments-vba/comment-page-1/#comment-6227</link>
		<dc:creator>Manage This! &#187; Blog Archive &#187; Bending OneNote and Outlook to Fit my GTD System</dc:creator>
		<pubDate>Mon, 23 Feb 2009 03:22:04 +0000</pubDate>
		<guid isPermaLink="false">http://manage-this.com/strip-outlook-attachments-vba/#comment-6227</guid>
		<description>[...] them here in reverse chronological order. I can also paste particularly important emails here… I usually strip the attachments first using an Outlook VBA macro that I wrote. This keeps the size of the embedded email small. The VBA macro replaces the files with links, so [...]</description>
		<content:encoded><![CDATA[<p>[...] them here in reverse chronological order. I can also paste particularly important emails here… I usually strip the attachments first using an Outlook VBA macro that I wrote. This keeps the size of the embedded email small. The VBA macro replaces the files with links, so [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

