<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Saving All Attachments in Outlook</title>
	<atom:link href="http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/feed/" rel="self" type="application/rss+xml" />
	<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/</link>
	<description>Making Microsoft .Net Development Magical</description>
	<lastBuildDate>Tue, 07 Feb 2012 16:57:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: ralphbarlow</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-30064</link>
		<dc:creator><![CDATA[ralphbarlow]]></dc:creator>
		<pubDate>Tue, 04 Oct 2011 08:10:53 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-30064</guid>
		<description><![CDATA[I don&#039;t seem to be able to get to the code page...]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t seem to be able to get to the code page&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tjousk</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-30045</link>
		<dc:creator><![CDATA[tjousk]]></dc:creator>
		<pubDate>Tue, 27 Sep 2011 23:22:07 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-30045</guid>
		<description><![CDATA[I&#039;ve looked for a new post as mentioned in the comment I am replying to, and cannot find it.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve looked for a new post as mentioned in the comment I am replying to, and cannot find it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishna Chaitanya</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-29809</link>
		<dc:creator><![CDATA[Krishna Chaitanya]]></dc:creator>
		<pubDate>Sat, 20 Aug 2011 12:30:16 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-29809</guid>
		<description><![CDATA[I have checked your new post and downloaded it from there. Thanks Arcane for a Wonderful Code!]]></description>
		<content:encoded><![CDATA[<p>I have checked your new post and downloaded it from there. Thanks Arcane for a Wonderful Code!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishna Chaitanya</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-29767</link>
		<dc:creator><![CDATA[Krishna Chaitanya]]></dc:creator>
		<pubDate>Tue, 16 Aug 2011 19:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-29767</guid>
		<description><![CDATA[Hi arcane code,

I&#039;m running into an issue while downloading the macro to my computer when I click the link you gave it says &quot;You must both be a user of this blog as well as be currently logged into WordPress.com&quot; I&#039;m logged on already. Thanks.]]></description>
		<content:encoded><![CDATA[<p>Hi arcane code,</p>
<p>I&#8217;m running into an issue while downloading the macro to my computer when I click the link you gave it says &#8220;You must both be a user of this blog as well as be currently logged into WordPress.com&#8221; I&#8217;m logged on already. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jose</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-29295</link>
		<dc:creator><![CDATA[Jose]]></dc:creator>
		<pubDate>Fri, 22 Apr 2011 06:42:04 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-29295</guid>
		<description><![CDATA[Hello, this is an excellent site. 10 point for the programmer. Also, I have been looking for years a tool to allow me to compress a folder or file, split it in specific size an email it on separated emails to the same address. Very useful when sending big files to a limited inbox. All in one single sequence. Please help. My knowledge in programing will take me time to reach this target.
Thanks]]></description>
		<content:encoded><![CDATA[<p>Hello, this is an excellent site. 10 point for the programmer. Also, I have been looking for years a tool to allow me to compress a folder or file, split it in specific size an email it on separated emails to the same address. Very useful when sending big files to a limited inbox. All in one single sequence. Please help. My knowledge in programing will take me time to reach this target.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vinod Kumar</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-27593</link>
		<dc:creator><![CDATA[Vinod Kumar]]></dc:creator>
		<pubDate>Wed, 24 Mar 2010 13:34:15 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-27593</guid>
		<description><![CDATA[Hi,

Am also having a problem in the coding while running the macro &quot;Set att = Sel.Item(cnt).Attachments.Item(AttachmentCnt)&quot; getting type mismatch error msg and also i tried changing &quot;Set Sel = Exp.CurrentFolder.Items&quot; &amp; &quot;Dim Sel As Outlook.Items&quot; as per your instrution.

Regards,
Vinod]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Am also having a problem in the coding while running the macro &#8220;Set att = Sel.Item(cnt).Attachments.Item(AttachmentCnt)&#8221; getting type mismatch error msg and also i tried changing &#8220;Set Sel = Exp.CurrentFolder.Items&#8221; &amp; &#8220;Dim Sel As Outlook.Items&#8221; as per your instrution.</p>
<p>Regards,<br />
Vinod</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vinod Kumar</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-27592</link>
		<dc:creator><![CDATA[Vinod Kumar]]></dc:creator>
		<pubDate>Wed, 24 Mar 2010 11:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-27592</guid>
		<description><![CDATA[Hi,

Can you please help to retrieve all the attachment from a particular folder and save it in C:\SCB_Attachment.

Note: Sorry, could you please CC: a copy of the coding in the below email.

Thanks Inadvance.

Best Regards,
Vinod Kumar. S
vinodgo@gmail.com]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Can you please help to retrieve all the attachment from a particular folder and save it in C:\SCB_Attachment.</p>
<p>Note: Sorry, could you please CC: a copy of the coding in the below email.</p>
<p>Thanks Inadvance.</p>
<p>Best Regards,<br />
Vinod Kumar. S<br />
<a href="mailto:vinodgo@gmail.com">vinodgo@gmail.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nils Gruson</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-27177</link>
		<dc:creator><![CDATA[Nils Gruson]]></dc:creator>
		<pubDate>Tue, 27 Oct 2009 10:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-27177</guid>
		<description><![CDATA[Have you any idea how to save password protected attachments to disk? 
I receive mails with attached password protected CSV files.
Now I&#039;m trying to write a piece of VBA code to save these files to disk, but the SaveToFile call on these attachments obviously fail because I didn&#039;t provide a password. But I can&#039;t find where to do this anyway.
Or is there any way to open these attachments without saving them to disk first with the Excel Object Model and go from there?

Tia,
Nils Gruson]]></description>
		<content:encoded><![CDATA[<p>Have you any idea how to save password protected attachments to disk?<br />
I receive mails with attached password protected CSV files.<br />
Now I&#8217;m trying to write a piece of VBA code to save these files to disk, but the SaveToFile call on these attachments obviously fail because I didn&#8217;t provide a password. But I can&#8217;t find where to do this anyway.<br />
Or is there any way to open these attachments without saving them to disk first with the Excel Object Model and go from there?</p>
<p>Tia,<br />
Nils Gruson</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-27122</link>
		<dc:creator><![CDATA[Justin]]></dc:creator>
		<pubDate>Tue, 13 Oct 2009 09:05:32 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-27122</guid>
		<description><![CDATA[Thank you very much, this saves me so much time]]></description>
		<content:encoded><![CDATA[<p>Thank you very much, this saves me so much time</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kedar</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-26655</link>
		<dc:creator><![CDATA[kedar]]></dc:creator>
		<pubDate>Fri, 24 Apr 2009 15:13:26 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-26655</guid>
		<description><![CDATA[Hi Rogelio,

Can you help me to get the entire code pls?

Kedar]]></description>
		<content:encoded><![CDATA[<p>Hi Rogelio,</p>
<p>Can you help me to get the entire code pls?</p>
<p>Kedar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fw</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-26370</link>
		<dc:creator><![CDATA[Fw]]></dc:creator>
		<pubDate>Wed, 21 Jan 2009 11:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-26370</guid>
		<description><![CDATA[awesome. Thank you very much indeed]]></description>
		<content:encoded><![CDATA[<p>awesome. Thank you very much indeed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roberto</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-26352</link>
		<dc:creator><![CDATA[Roberto]]></dc:creator>
		<pubDate>Wed, 14 Jan 2009 22:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-26352</guid>
		<description><![CDATA[I&#039;m trying to save the attachments for the mail incoming. Is it possible to run the macro that saves attachments for every mail in ?
Thanks in advance!!]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to save the attachments for the mail incoming. Is it possible to run the macro that saves attachments for every mail in ?<br />
Thanks in advance!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-25668</link>
		<dc:creator><![CDATA[Paul]]></dc:creator>
		<pubDate>Mon, 07 Jul 2008 09:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-25668</guid>
		<description><![CDATA[I&#039;m running the script on all my work mail, but I&#039;m getting the following runtime error: &#039;-2147024809 (80070057)&#039;: Cannot save the attachment. When I click on debug it brings me to the att.SaveAsFile (outputDir + outputFile) line. Seems to happen after the 66th attachment has been downloaded. Any ideas? Thank you!]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m running the script on all my work mail, but I&#8217;m getting the following runtime error: &#8216;-2147024809 (80070057)&#8217;: Cannot save the attachment. When I click on debug it brings me to the att.SaveAsFile (outputDir + outputFile) line. Seems to happen after the 66th attachment has been downloaded. Any ideas? Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Connie</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-25613</link>
		<dc:creator><![CDATA[Connie]]></dc:creator>
		<pubDate>Tue, 24 Jun 2008 18:26:38 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-25613</guid>
		<description><![CDATA[I figured it out.  No need to answer.  I went to the Visual Basic Editor, Tools, References and clicked on Microsoft Scripting Runtime.]]></description>
		<content:encoded><![CDATA[<p>I figured it out.  No need to answer.  I went to the Visual Basic Editor, Tools, References and clicked on Microsoft Scripting Runtime.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Connie</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-25612</link>
		<dc:creator><![CDATA[Connie]]></dc:creator>
		<pubDate>Tue, 24 Jun 2008 16:12:08 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-25612</guid>
		<description><![CDATA[&#039;Requires reference to Microsoft Scripting Runtime (SCRRUN.DLL)
  Dim fso As FileSystemObject

I ran into a compile error at this point in the macro.  What do I need to do?
Thanks.
Connie]]></description>
		<content:encoded><![CDATA[<p>&#8216;Requires reference to Microsoft Scripting Runtime (SCRRUN.DLL)<br />
  Dim fso As FileSystemObject</p>
<p>I ran into a compile error at this point in the macro.  What do I need to do?<br />
Thanks.<br />
Connie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Attila</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-25466</link>
		<dc:creator><![CDATA[Attila]]></dc:creator>
		<pubDate>Thu, 05 Jun 2008 14:16:26 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-25466</guid>
		<description><![CDATA[Dear expert,

I do not know much about VBA programming and I hope You can help me by modifying the sample You have put on this site.
I would like to ask some help in saving attachment with the following condition:

1. I got mails every day with attachments and I would like to save only attachments of mail messages for that day (not all, and not from previous dates) from a subfolder named &quot;MEAS&quot; in Inbox.

2. I usually select each message one by one, and would like to run the macro for each message. Message titles contain date (if it is important..) and a few letter for further identification like Meas1 +date, Meas2 +date.

3. I would like to save attachments of each mail to C:/Attachment/2008 (no rest exists..) so:
with creating folder in folder 2008 like: 2008.06. as a subfolder, 
than create another subfolder for the day the mail received like 06.10 (for example) 
and saving each message attachments to further subfolders named by the letter in the title of the message for example Meas1. 
So if the message title contains Meas1, the saving destination subfolder in that day&#039;s folder would become AttachMeas1Saved.

I hope could explain it well and I would highly appreciate if You could help me with this matter.

Thank You in advance again.

Sincerely

Attila








and thanks for it in advance]]></description>
		<content:encoded><![CDATA[<p>Dear expert,</p>
<p>I do not know much about VBA programming and I hope You can help me by modifying the sample You have put on this site.<br />
I would like to ask some help in saving attachment with the following condition:</p>
<p>1. I got mails every day with attachments and I would like to save only attachments of mail messages for that day (not all, and not from previous dates) from a subfolder named &#8220;MEAS&#8221; in Inbox.</p>
<p>2. I usually select each message one by one, and would like to run the macro for each message. Message titles contain date (if it is important..) and a few letter for further identification like Meas1 +date, Meas2 +date.</p>
<p>3. I would like to save attachments of each mail to C:/Attachment/2008 (no rest exists..) so:<br />
with creating folder in folder 2008 like: 2008.06. as a subfolder,<br />
than create another subfolder for the day the mail received like 06.10 (for example)<br />
and saving each message attachments to further subfolders named by the letter in the title of the message for example Meas1.<br />
So if the message title contains Meas1, the saving destination subfolder in that day&#8217;s folder would become AttachMeas1Saved.</p>
<p>I hope could explain it well and I would highly appreciate if You could help me with this matter.</p>
<p>Thank You in advance again.</p>
<p>Sincerely</p>
<p>Attila</p>
<p>and thanks for it in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-25221</link>
		<dc:creator><![CDATA[Nicholas]]></dc:creator>
		<pubDate>Fri, 09 May 2008 20:47:34 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-25221</guid>
		<description><![CDATA[Is there any simpler way to do this for non-techies?

I&#039;m not able to understand all of this macro and certificate business.

Thanks.]]></description>
		<content:encoded><![CDATA[<p>Is there any simpler way to do this for non-techies?</p>
<p>I&#8217;m not able to understand all of this macro and certificate business.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Romain</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-24757</link>
		<dc:creator><![CDATA[Romain]]></dc:creator>
		<pubDate>Thu, 13 Mar 2008 10:58:13 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-24757</guid>
		<description><![CDATA[Thank you so much for this macro. It saves me a lot of time.]]></description>
		<content:encoded><![CDATA[<p>Thank you so much for this macro. It saves me a lot of time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shay</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-20753</link>
		<dc:creator><![CDATA[Shay]]></dc:creator>
		<pubDate>Sun, 02 Dec 2007 14:44:29 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-20753</guid>
		<description><![CDATA[Hi

Sorry, I didn&#039;t know how to contact you so I decided to post it here since it regards to attachments.

I have incoming emails (a lot of) that has one attachment HTML file (newsletter). 
The attached newsletter contains (at the bottom) an email address link of a user (A tag).
I need to extract that address and unsubscribe the user from one of my web applications.

Up until now, using Exchange 2003 &amp; outlook 2007 I was able to do it with a macro. 
I saved the attachment to a text file on disk and then parsed it to extract the email address. 
Later on I converted it to a PowerShell script.

When I switched to Exchange 2007, things started to go wrong. 
Now, when I save the attachment to a text file, the contents looks like binary encoding.

I also posted this question in the Outlook.general and Exchange.admin newsgroups, Nothing returned :-(
Is there a way to *fix* it? How can I save the attachment to a text file?

Thanks,

Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com]]></description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Sorry, I didn&#8217;t know how to contact you so I decided to post it here since it regards to attachments.</p>
<p>I have incoming emails (a lot of) that has one attachment HTML file (newsletter).<br />
The attached newsletter contains (at the bottom) an email address link of a user (A tag).<br />
I need to extract that address and unsubscribe the user from one of my web applications.</p>
<p>Up until now, using Exchange 2003 &amp; outlook 2007 I was able to do it with a macro.<br />
I saved the attachment to a text file on disk and then parsed it to extract the email address.<br />
Later on I converted it to a PowerShell script.</p>
<p>When I switched to Exchange 2007, things started to go wrong.<br />
Now, when I save the attachment to a text file, the contents looks like binary encoding.</p>
<p>I also posted this question in the Outlook.general and Exchange.admin newsgroups, Nothing returned <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /><br />
Is there a way to *fix* it? How can I save the attachment to a text file?</p>
<p>Thanks,</p>
<p>Shay Levi<br />
$cript Fanatic<br />
<a href="http://scriptolog.blogspot.com" rel="nofollow">http://scriptolog.blogspot.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chad young</title>
		<link>http://arcanecode.com/2007/02/28/saving-all-attachments-in-outlook/#comment-17996</link>
		<dc:creator><![CDATA[chad young]]></dc:creator>
		<pubDate>Fri, 02 Nov 2007 15:18:01 +0000</pubDate>
		<guid isPermaLink="false">http://arcanecode.wordpress.com/2007/02/28/saving-all-attachments-in-outlook/#comment-17996</guid>
		<description><![CDATA[I have 100&#039;s of PDF scans sent by a printer/scanner, all using the same &quot;scan001.pdf&quot; filename. 

In case anyone has the same situation as me, I modified the loop a bit to automatically save attachments with the same name by attaching a sequence number to the end rather than asking for a new name.

The result is &quot;scan001.pdf 0.PDF&quot;, &quot;scan001.pdf 1.PDF&quot;, etc

This is a quick hack and leaves the filenames with extra extension characters, but it works fine for my needs. I rename them manually once I view them.
-------------
  &#039; Sequence Number for matching filenames
  Dim sequenceNumber As Integer
  Dim fileExtension As String
  
  sequenceNumber = 0
  fileExtension = &quot;.PDF&quot;
----------------
        Do While fileExists = True
          &#039; prompt for new filename (original code)
          &#039;outputFile = InputBox(&quot;The file &quot; + outputFile _
          &#039;  + &quot; already exists in the destination directory of &quot; _
          &#039;  + outputDir + &quot;. Please enter a new name, or hit cancel to skip this one file.&quot;, &quot;File Exists&quot;, outputFile)
          
          &#039; new code to just append a sequence number at the end for multiple mails using the same filename
          &#039; time and data stamp of the attachment are preserved
          outputFile = (outputFile + &quot;.&quot; + Str$(sequenceNumber) + fileExtension)
          sequenceNumber = sequenceNumber + 1
          
          &#039;If user hit cancel
          If outputFile = &quot;&quot; Then
            &#039;Exit leaving fileexists true. That will be a flag not to write the file
            Exit Do
          End If
          fileExists = fso.fileExists(outputDir + outputFile)
        Loop
------------------]]></description>
		<content:encoded><![CDATA[<p>I have 100&#8242;s of PDF scans sent by a printer/scanner, all using the same &#8220;scan001.pdf&#8221; filename. </p>
<p>In case anyone has the same situation as me, I modified the loop a bit to automatically save attachments with the same name by attaching a sequence number to the end rather than asking for a new name.</p>
<p>The result is &#8220;scan001.pdf 0.PDF&#8221;, &#8220;scan001.pdf 1.PDF&#8221;, etc</p>
<p>This is a quick hack and leaves the filenames with extra extension characters, but it works fine for my needs. I rename them manually once I view them.<br />
&#8212;&#8212;&#8212;&#8212;-<br />
  &#8216; Sequence Number for matching filenames<br />
  Dim sequenceNumber As Integer<br />
  Dim fileExtension As String</p>
<p>  sequenceNumber = 0<br />
  fileExtension = &#8220;.PDF&#8221;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
        Do While fileExists = True<br />
          &#8216; prompt for new filename (original code)<br />
          &#8216;outputFile = InputBox(&#8220;The file &#8221; + outputFile _<br />
          &#8216;  + &#8221; already exists in the destination directory of &#8221; _<br />
          &#8216;  + outputDir + &#8220;. Please enter a new name, or hit cancel to skip this one file.&#8221;, &#8220;File Exists&#8221;, outputFile)</p>
<p>          &#8216; new code to just append a sequence number at the end for multiple mails using the same filename<br />
          &#8216; time and data stamp of the attachment are preserved<br />
          outputFile = (outputFile + &#8220;.&#8221; + Str$(sequenceNumber) + fileExtension)<br />
          sequenceNumber = sequenceNumber + 1</p>
<p>          &#8216;If user hit cancel<br />
          If outputFile = &#8220;&#8221; Then<br />
            &#8216;Exit leaving fileexists true. That will be a flag not to write the file<br />
            Exit Do<br />
          End If<br />
          fileExists = fso.fileExists(outputDir + outputFile)<br />
        Loop<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

