<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>JP Software Technologies</title>
	
	<link>http://www.jpsoftwaretech.com</link>
	<description>Custom Office Programming and Automation</description>
	<lastBuildDate>Thu, 17 May 2012 21:51:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CodeForExcelAndOutlook" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="codeforexcelandoutlook" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /><image><link>http://www.jpsoftwaretech.com/</link><url>http://img.jpsoftwaretech.com/xo.png</url><title>Logo</title></image><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">CodeForExcelAndOutlook</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Create and append Word document tables from VBA</title>
		<link>http://www.jpsoftwaretech.com/create-append-word-tables-vba/</link>
		<comments>http://www.jpsoftwaretech.com/create-append-word-tables-vba/#comments</comments>
		<pubDate>Thu, 17 May 2012 11:00:48 +0000</pubDate>
		<dc:creator>JP</dc:creator>
				<category><![CDATA[Word]]></category>
		<category><![CDATA[append]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.jpsoftwaretech.com/?p=2403</guid>
		<description><![CDATA[<p>If you ever needed to export information from Excel into a Word table, this piece of code might help. I originally intended this to be used with the Random Data Generator addin, but it isn't practical to paste what could potentially be thousands of table cells into Word. According to Exporting to Microsoft Word, Word<br /><em>Continue Reading:</em> <a class="more-link" href="http://www.jpsoftwaretech.com/create-append-word-tables-vba/">Create and append Word document tables from VBA &#187;</a></p><p><a href="http://www.jpsoftwaretech.com/create-append-word-tables-vba/">Create and append Word document tables from VBA</a> is Copyright © <a href="http://www.jpsoftwaretech.com">JP Software Technologies</a>. All Rights Reserved.</p>]]></description>
			<content:encoded><![CDATA[<p>If you ever needed to export information from Excel into a Word table, this piece of code might help.<br />
<span id="more-2403"></span><br />
I originally intended this to be used with the <a href="http://www.randomdatagenerator.net/">Random Data Generator</a> addin, but it isn't practical to paste what could potentially be thousands of table cells into Word.</p>
<p>According to <a href="http://msdn.microsoft.com/en-us/library/cc627455(v=sql.100).aspx">Exporting to Microsoft Word</a>, Word tables support a maximum of 32767 rows and 63 columns. Actually, I'm not sure where I saw the 32k rows limit, but 63 seems to be what everybody says is the column limit. If anyone could verify that I'd be glad to hear it.</p>
<p>So here's a procedure that takes a variable amount of columns and rows and either creates or opens an existing Word document, appending the table to the end of the document. If a new document is created, the "end" of the document is obviously the same as the start, so the table becomes the only content in the file. If an existing document is passed, it is opened and the table is appended to the end of the existing content. The code is based on code found at <a href="http://msdn.microsoft.com/en-us/library/aa537149(v=office.11).aspx">Automating Word Tables for Data Insertion and Extraction</a>.</p>
<p>This code has been tested in Word 2003, please let me know if it works in other versions.</p>
<pre class="brush: vb; title: Code:; notranslate">Sub AddTableToWordDoc(entries As Variant, filePath As String, _
    Optional styleToApply As Variant = &quot;Table Simple 3&quot;)
' specify existing file to add table to
' existing Word document
  On Error GoTo ErrorHandler

  Dim wordApp As Object ' Word.Application
  Dim wordDoc As Object ' Word.Document
  Dim wordRange As Object ' Word.Range
  Dim wordTable As Object ' Word.Table
  Dim numRows As Long, numCols As Long
  Dim nrRows As Long, nrCols As Long
  Dim myRange As Object ' Word.Range
  ' late bound constants
  Const wdWindowStateMinimize As Long = 2
  Const wdNormalView As Long = 1
  Const wdDoNotSaveChanges As Long = 0
  Const wdWord9TableBehavior As Long = 1
  Const wdAutoFitContent As Long = 1

  ' create word document
  On Error Resume Next
  Set wordApp = CreateObject(&quot;Word.Application&quot;)
  If wordApp Is Nothing Then
    MsgBox &quot;Could not start Microsoft Word&quot;
    GoTo ProgramExit
  End If
  ' resume normal error handling
  On Error GoTo ErrorHandler

  ' if an existing file is specified, open it, else create new file
  If Len(Dir(filePath)) &gt; 0 Then
    Set wordDoc = wordApp.documents.Open(filePath)
  Else
    Set wordDoc = wordApp.documents.Add
  End If

  ' maximize execution speed
  With wordDoc.Windows(1)
    .WindowState = wdWindowStateMinimize
    .View = wdNormalView
  End With
  With wordApp
    .Options.Pagination = False
    .ScreenUpdating = False
  End With

  ' create table w/ appropriate # of rows &amp; cols
  ' append to existing file, or simply add (if new file)
  numRows = UBound(entries)
  numCols = UBound(entries, 2)
  Set wordRange = wordDoc.Range(wordDoc.Range.Characters.Count - 1)
  Set wordTable = wordRange.Tables.Add(wordRange, numRows, _
    numCols, wdWord9TableBehavior, wdAutoFitContent)

  ' loop through array and populate table cells
  For nrRows = 1 To numRows
    For nrCols = 1 To numCols
      wordTable.cell(nrRows, nrCols).Range.text = _
          entries(nrRows, nrCols)
    Next nrCols
  Next nrRows

  ' format table
  With wordTable
    .style = styleToApply  ' ex: &quot;Table Simple 3&quot;
    .ApplyStyleHeadingRows = True
    .ApplyStyleLastRow = True
    .ApplyStyleFirstColumn = True
    .ApplyStyleLastColumn = True
  End With

  ' save file and close Word
  With wordDoc
    .SaveAs filePath
    .Close wdDoNotSaveChanges
  End With
  wordApp.Quit

ProgramExit:
  Exit Sub
ErrorHandler:
  MsgBox Err.number &amp; &quot; - &quot; &amp; Err.Description
  Resume ProgramExit
End Sub</pre>
<p>First we create a new instance of <var>Word.Application</var>, then check if the filepath being passed is for an existing file. If the file exists, we open it, otherwise we create a new document. After a few speed optimizations, we create a new table and append it to the end of the document.</p>
<p><var>Document.Range.Characters.Count</var> is used to determine the end of the file. This value represents the number of characters in the file, and the table is placed after this space. Regardless of whether the file is new or not, the table will be placed after the last character. The fact that a new file has no content is irrelevant; the end of the file just happens to also be the beginning. We are telling VBA to put the table at the "end" of the file, regardless of where it is.</p>
<p>Afterwards, we loop through the array and paste values into the table cells and apply some formatting. You can remove or change these values (or parameterize them). Finally we save and close the file.</p>
<p>Because I am not familiar with the <a href="http://msdn.microsoft.com/en-us/library/ff837519.aspx">Word Object Model</a>, a lot of assumptions are made in the code. For example, the <var>Tables.Add</var> Method assumes you want to autofit the cells. I also assumed a default style and applied it to the table.</p>
<p>If there is a better way to do this, I don't know it.</p>
<p><a href="http://www.jpsoftwaretech.com/create-append-word-tables-vba/">Create and append Word document tables from VBA</a> is Copyright © <a href="http://www.jpsoftwaretech.com">JP Software Technologies</a>. All Rights Reserved.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=N2v4QAYn-3k:kMu1fZVCrcs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=N2v4QAYn-3k:kMu1fZVCrcs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=N2v4QAYn-3k:kMu1fZVCrcs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=N2v4QAYn-3k:kMu1fZVCrcs:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=N2v4QAYn-3k:kMu1fZVCrcs:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=N2v4QAYn-3k:kMu1fZVCrcs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=N2v4QAYn-3k:kMu1fZVCrcs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=N2v4QAYn-3k:kMu1fZVCrcs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=N2v4QAYn-3k:kMu1fZVCrcs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=N2v4QAYn-3k:kMu1fZVCrcs:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CodeForExcelAndOutlook/~4/N2v4QAYn-3k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss />
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is that a letter?</title>
		<link>http://www.jpsoftwaretech.com/is-that-a-letter/</link>
		<comments>http://www.jpsoftwaretech.com/is-that-a-letter/#comments</comments>
		<pubDate>Mon, 14 May 2012 11:00:23 +0000</pubDate>
		<dc:creator>JP</dc:creator>
				<category><![CDATA[VBA]]></category>
		<category><![CDATA[alphanumeric]]></category>
		<category><![CDATA[RegExp]]></category>

		<guid isPermaLink="false">http://www.jpsoftwaretech.com/?p=2401</guid>
		<description><![CDATA[<p>In IsLetter Function for VBA, Outlook MVP David Lee posts a function for checking if a given string is a letter. I like it because it actually checks if the entire string, regardless of its length, is comprised of letters. It doesn't hardcode the string length &#8212; the loop makes the length of the string<br /><em>Continue Reading:</em> <a class="more-link" href="http://www.jpsoftwaretech.com/is-that-a-letter/">Is that a letter? &#187;</a></p><p><a href="http://www.jpsoftwaretech.com/is-that-a-letter/">Is that a letter?</a> is Copyright © <a href="http://www.jpsoftwaretech.com">JP Software Technologies</a>. All Rights Reserved.</p>]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://techniclee.wordpress.com/2010/07/21/isletter-function-for-vba/">IsLetter Function for VBA</a>, Outlook MVP David Lee posts a function for checking if a given string is a letter.<br />
<span id="more-2401"></span><br />
I like it because it actually checks if the entire string, regardless of its length, is comprised of letters. It doesn't hardcode the string length &#8212; the loop makes the length of the string superficial. If there is only one character, it simply loops once.</p>
<p>It uses the <a href="http://msdn.microsoft.com/en-us/library/xfw01fx4(v=vs.85).aspx">Asc</a> function to determine the character code for each character in the string, taking advantage of the fact that the letters A-Z and a-z are consecutive. You can see this if you use the <a href="http://www.jpsoftwaretech.com/excel-vba/excels-character-set-workbook/">character set workbook</a> I use.</p>
<p>One thing it does that I don't like is it explicitly sets the return value to <samp>False</samp>, and it repeatedly sets the return value to <samp>True</samp>. A better workflow would be to assume that the input string contains only letters (<var>IsLetter</var> = <samp>True</samp>), then set <var>IsLetter</var> to <samp>False</samp> (and immediately exit) if we encounter a non-letter (is that a word?). This way, we only set <var>IsLetter</var> to <samp>True</samp> or <samp>False</samp> once, instead of wasting processor time setting it to <samp>True</samp> N times.</p>
<pre class="brush: vb; title: Code:; notranslate">Function IsLetter(strValue As String) As Boolean
  Dim intPos As Integer
  ' assume True
  IsLetter = True

  For intPos = 1 To Len(strValue)
    Select Case Asc(Mid(strValue, intPos, 1))
    Case 65 To 90, 97 To 122

    Case Else
      ' not a letter, return False
      IsLetter = False
      Exit For
    End Select
  Next intPos
End Function</pre>
<p>In a <a href="http://techniclee.wordpress.com/2010/07/21/isletter-function-for-vba/comment-page-1/#comment-212">comment</a> on that article I posted two additional ways to check if a given string contains only letters. They still loop through each character of the input string, but they use the <a href="http://msdn.microsoft.com/en-us/library/swf8kaxw(v=vs.80).aspx">Like</a> Operator instead of comparing each character to character codes.</p>
<h3>RegExp to the Rescue</h3>
<p>We can also use <a href="http://www.jpsoftwaretech.com/vba/regular-expressions-vba/">Regular Expressions</a> to check if a string contains only letters. This would mean only one pass through a string, instead of looping!</p>
<p>We need two functions from the <a href="http://www.jpsoftwaretech.com/vba/regular-expressions-vba/">Regular Expressions</a> page: <var>GetRegEx</var> and <var>TestRegex</var>. Once you copy those functions to a <a href="http://www.rondebruin.nl/code.htm#General">standard</a> module, the following function may be used to check if a given string consists only of letters a-z (case insensitive):</p>
<pre class="brush: vb; title: Code:; notranslate">Function IsAlpha(stringToCheck As String) As Boolean
  Dim regex As Object ' VBScript.RegExp
  Set regex = GetRegEx
  If Not regex Is Nothing Then
    IsAlpha = TestRegex(regex, &quot;^[a-zA-Z]+$&quot;, stringToCheck)
  End If
End Function</pre>
<p>"^[a-zA-Z]+$" roughly translates to <q>from the start of the string, match any number/combination of upper or lower case letters until the end of the string.</q></p>
<h3>RegEx vs. Loop</h3>
<p>How does the RegEx perform against a loop?</p>
<p>I used the following extremely un-scientific procedure to test the relative speeds of the <var>IsLetter</var> (loop) and <var>IsAlpha</var> (RegEx) functions.</p>
<pre class="brush: vb; title: Code:; notranslate">Sub TestRegexLoop()

  Dim i As Long
  Dim startTimeRegex As Single
  Dim endTimeRegex As Single
  Dim startTimeLoop As Single
  Dim endTimeLoop As Single
  Dim msg As String
  Dim is_a_letter As Boolean

  Const numberOfLoops As Long = 1000
  Const stringToCheck As String = _
    &quot;Thequickbrownfoxjumpsoverthelazydog&quot;

  ' use Regex
  startTimeRegex = Timer
  For i = 1 To numberOfLoops
    is_a_letter = IsAlpha(stringToCheck)
  Next i
  endTimeRegex = Timer

  ' use Loop
  startTimeLoop = Timer
  For i = 1 To numberOfLoops
    is_a_letter = IsLetter(stringToCheck)
  Next i
  endTimeLoop = Timer

  msg = &quot;Number of iterations: &quot; &amp; numberOfLoops &amp; vbCrLf
  msg = msg &amp; &quot;Using Regex: &quot; &amp; _
    Format(endTimeRegex - startTimeRegex, &quot;#.###&quot;) &amp; &quot; seconds&quot; &amp; vbCrLf
  msg = msg &amp; &quot;Using Loop: &quot; &amp; _
    Format(endTimeLoop - startTimeLoop, &quot;#.###&quot;) &amp; &quot; seconds&quot; &amp; vbCrLf
  MsgBox msg
End Sub</pre>
<h4>Results</h4>
<p>Let's see how both functions performed. At just 1,000 iterations, RegEx is already much slower than a loop.</p>
<p><img src="http://img.jpsoftwaretech.com/TestRegexLoop_1000.png" alt="Test Regex and Loop, 1000 iterations" title="Test Regex and Loop, 1000 iterations" height="133" width="165" /></p>
<p>At 10,000 iterations, this is a Mike Tyson fight. The function that uses a loop is barely breaking a sweat, while RegEx is clocking in at 14 seconds. I quit.</p>
<p><img src="http://img.jpsoftwaretech.com/TestRegexLoop_10000.png" alt="Test Regex and Loop, 10000 iterations" title="Test Regex and Loop, 10000 iterations" height="133" width="171" /></p>
<h3>RegEx vs. Loop Rematch</h3>
<p>We're not being fair. After all, <var>IsAlpha</var> had to instantiate the RegExp object every time it is called. That has to account for some of the slowdown. The original <var>IsAlpha</var> is a function trying to do too much. So we alter the <var>IsAlpha</var> function to take in an existing RegExp object&#8230;</p>
<pre class="brush: vb; title: Code:; notranslate">Function IsAlpha(regex As Object, stringToCheck As String) As Boolean
  IsAlpha = TestRegex(regex, &quot;^[a-zA-Z]+$&quot;, stringToCheck)
End Function</pre>
<p>&#8230;and we create the RegExp object in our test procedure and pass it to <var>IsAlpha</var>:</p>
<pre class="brush: vb; title: Code:; notranslate">Sub TestRegexLoop2()

  Dim i As Long
  Dim startTimeRegex As Single
  Dim endTimeRegex As Single
  Dim startTimeLoop As Single
  Dim endTimeLoop As Single
  Dim msg As String
  Dim is_a_letter As Boolean
  Dim regex As Object  ' RegExp

  Const numberOfLoops As Long = 1000
  Const stringToCheck As String = &quot;Thequickbrownfoxjumpsoverthelazydog&quot;

  ' use Regex
  startTimeRegex = Timer

  Set regex = GetRegEx
  If Not regex Is Nothing Then
    For i = 1 To numberOfLoops
      is_a_letter = IsAlpha(regex, stringToCheck)
    Next i
  End If
  endTimeRegex = Timer

  ' use Loop
  startTimeLoop = Timer
  For i = 1 To numberOfLoops
    is_a_letter = IsLetter(stringToCheck)
  Next i
  endTimeLoop = Timer

  msg = &quot;Number of iterations: &quot; &amp; numberOfLoops &amp; vbCrLf
  msg = msg &amp; &quot;Using Regex: &quot; &amp; _
    Format(endTimeRegex - startTimeRegex, &quot;#.###&quot;) &amp; &quot; seconds&quot; &amp; vbCrLf
  msg = msg &amp; &quot;Using Loop: &quot; &amp; _
    Format(endTimeLoop - startTimeLoop, &quot;#.###&quot;) &amp; &quot; seconds&quot; &amp; vbCrLf
  MsgBox msg
End Sub</pre>
<p>I have a feeling this is going to be more of a fair fight.</p>
<h4>Results</h4>
<p>That's more like it! Even passing the RegExp object between two functions has barely slowed it down.</p>
<p><img src="http://img.jpsoftwaretech.com/TestRegexLoopRematch_1000.png" alt="Test Regex and Loop Rematch, 1000 iterations" title="Test Regex and Loop Rematch, 1000 iterations" height="133" width="158" /></p>
<p>At 10,000 iterations the RegEx function is only slightly slower. In my humble non-scientific opinion, it is statistically insignificant.</p>
<p><img src="http://img.jpsoftwaretech.com/TestRegexLoopRematch_10000.png" alt="Test Regex and Loop Rematch, 10000 iterations" title="Test Regex and Loop Rematch, 10000 iterations" height="133" width="164" /></p>
<p>Even at 100,000 iterations they are both taking nearly 1 second to complete.</p>
<p><img src="http://img.jpsoftwaretech.com/TestRegexLoopRematch_100000.png" alt="Test Regex and Loop Rematch, 100000 iterations" title="Test Regex and Loop Rematch, 100000 iterations" height="133" width="170" /></p>
<h3>Conclusion</h3>
<p>Even though RegExp can evaluate the entire string in one go, the loop was still faster. Refactoring the <var>IsAlpha</var> function to create the RegExp object only once, however, and passing it to another function, closed the gap. I like RegEx but don't have a strong preference, so when I use it I will keep in mind that the RegExp object should be created in a parent procedure and passed to a child function for it to use RegExp parsing methods.</p>
<p><a href="http://www.jpsoftwaretech.com/is-that-a-letter/">Is that a letter?</a> is Copyright © <a href="http://www.jpsoftwaretech.com">JP Software Technologies</a>. All Rights Reserved.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=PdmlScMhHhM:-p5yLIghRJg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=PdmlScMhHhM:-p5yLIghRJg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=PdmlScMhHhM:-p5yLIghRJg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=PdmlScMhHhM:-p5yLIghRJg:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=PdmlScMhHhM:-p5yLIghRJg:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=PdmlScMhHhM:-p5yLIghRJg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=PdmlScMhHhM:-p5yLIghRJg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=PdmlScMhHhM:-p5yLIghRJg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=PdmlScMhHhM:-p5yLIghRJg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=PdmlScMhHhM:-p5yLIghRJg:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CodeForExcelAndOutlook/~4/PdmlScMhHhM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss />
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Use the Recipients collection to add recipients to emails</title>
		<link>http://www.jpsoftwaretech.com/recipients-collection-add-recipients-emails/</link>
		<comments>http://www.jpsoftwaretech.com/recipients-collection-add-recipients-emails/#comments</comments>
		<pubDate>Fri, 11 May 2012 11:00:51 +0000</pubDate>
		<dc:creator>JP</dc:creator>
				<category><![CDATA[Outlook]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[Recipients]]></category>

		<guid isPermaLink="false">http://www.jpsoftwaretech.com/?p=2400</guid>
		<description><![CDATA[<p>DC asks for more best practices. One thing does come to mind. I see a lot of Outlook VBA code that uses MailItem.To, MailItem.CC and MailItem.BCC to set or get the list of recipients for a given item. For example, Ron de Bruin does this in a series of MSDN articles and on his website:<br /><em>Continue Reading:</em> <a class="more-link" href="http://www.jpsoftwaretech.com/recipients-collection-add-recipients-emails/">Use the Recipients collection to add recipients to emails &#187;</a></p><p><a href="http://www.jpsoftwaretech.com/recipients-collection-add-recipients-emails/">Use the Recipients collection to add recipients to emails</a> is Copyright © <a href="http://www.jpsoftwaretech.com">JP Software Technologies</a>. All Rights Reserved.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jpsoftwaretech.com/is-there-such-a-thing-as-bad-programming-code/#comment-3919">DC</a> asks for more best practices. One thing does come to mind.<br />
<span id="more-2400"></span><br />
I see a lot of Outlook VBA code that uses MailItem.To, MailItem.CC and MailItem.BCC to set or get the list of recipients for a given item.</p>
<p>For example, Ron de Bruin does this in a series of MSDN articles and on his website:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ff458119(office.11).aspx">Using VBA in Excel to Send Workbooks and Ranges Through E-Mail with Outlook (Part 1 of 2)</a></li>
<li><a href="http://www.rondebruin.nl/mail/folder2/mail4.htm">Mail Range or Selection</a></li>
</ul>
<p>Another example:</p>
<p><a href="http://www.paulsadowski.com/Sadowski/c_cdonts.htm">Sending Email From IIS with ASP and CDONTS</a></p>
<p>And yes, even Microsoft does it:</p>
<p><a href="http://technet.microsoft.com/en-us/library/ee176585.aspx">Sending E-Mail Without Installing the SMTP Service</a></p>
<p>For your review I humbly submit the following as a best practice: <strong>Use the Recipients Collection to manipulate Item Recipients.</strong></p>
<p>Before you say anything, I understand the following:</p>
<ul>
<li>VBA allows you to use To/CC/BCC properties to set recipients. If you were supposed to use the Recipients Collection instead, these properties would be read-only.</li>
<li>It is simpler to write ".To = abc@xyz.com" than the way I suggest, which is to set a reference to MailItem.Recipients, create the recipient and assign it to the "To" field.</li>
</ul>
<p>Instead of (assume <var>msg</var> is a variable of type <var>Outlook.MailItem</var>):</p>
<pre class="brush: vb; title: Code:; notranslate">msg.To = &quot;someone@somewhere.com&quot;</pre>
<p>you would write</p>
<pre class="brush: vb; title: Code:; notranslate">Dim recips As Object ' Outlook.Recipients
Dim currentRecipient As Object ' Outlook.Recipient
Set recips = msg.Recipients
Set currentRecipient = recips.Add &quot;someone@somewhere.com&quot;
currentRecipient.Type = olTo</pre>
<p>In <a href="http://www.jpsoftwaretech.com/working-with-the-outlook-recipients-collection-in-vba/">Working with the Outlook Recipients collection in VBA</a> I explained my rationale for why you should use MailItem.Recipients. The article includes methods for adding, counting and removing recipients, which I will update shortly and should leave you with no excuse not to use the Recipients Collection. But I will repeat my reasons here anyway, in order to try and convince you.</p>
<ol>
<li>The Recipients Collection is the interface designed for interacting with Recipients</li>
<li>The Recipients Collection is a more robust interface than .To, .CC, .BCC</li>
<li>To, CC and BCC only contain the display names</li>
<li>Microsoft wants you to use the Recipients Collection &#8211; I know this is a weak argument</li>
</ol>
<p>If you didn't already know, I am a big fan of encapsulation. As a result, I am a big fan of using interfaces designed for interacting with an object. So I repeat: <strong>The Recipients Collection is the interface designed for interacting with Recipients.</strong></p>
<p>If you use the To, CC or BCC properties in code you post publicly in order to set their values, I will correct you.</p>
<p>Let's put it this way: if you downloaded a XML file from the web, would you use <var>Instr</var> and <var>Mid</var> to find what you want, or would you use an interface (the MSXML DOM) that includes methods specifically designed to parse it?</p>
<p>If you have code that uses .To, .CC, .BCC, I encourage you to rewrite it using the methods I posted in <a href="http://www.jpsoftwaretech.com/working-with-the-outlook-recipients-collection-in-vba/">Working with the Outlook Recipients collection in VBA</a>. Let's collectively agree to use the methods designed for the purpose of manipulating Recipients. Your comments welcome.</p>
<p><a href="http://www.jpsoftwaretech.com/recipients-collection-add-recipients-emails/">Use the Recipients collection to add recipients to emails</a> is Copyright © <a href="http://www.jpsoftwaretech.com">JP Software Technologies</a>. All Rights Reserved.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=vEUVBVXiHS0:nU5Yo2xsHDs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=vEUVBVXiHS0:nU5Yo2xsHDs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=vEUVBVXiHS0:nU5Yo2xsHDs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=vEUVBVXiHS0:nU5Yo2xsHDs:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=vEUVBVXiHS0:nU5Yo2xsHDs:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=vEUVBVXiHS0:nU5Yo2xsHDs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=vEUVBVXiHS0:nU5Yo2xsHDs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=vEUVBVXiHS0:nU5Yo2xsHDs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=vEUVBVXiHS0:nU5Yo2xsHDs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=vEUVBVXiHS0:nU5Yo2xsHDs:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CodeForExcelAndOutlook/~4/vEUVBVXiHS0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss />
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get Previous Business Day in VBA</title>
		<link>http://www.jpsoftwaretech.com/get-previous-business-day-in-vba/</link>
		<comments>http://www.jpsoftwaretech.com/get-previous-business-day-in-vba/#comments</comments>
		<pubDate>Wed, 09 May 2012 11:00:50 +0000</pubDate>
		<dc:creator>JP</dc:creator>
				<category><![CDATA[VBA]]></category>
		<category><![CDATA[business day]]></category>
		<category><![CDATA[DateAdd]]></category>
		<category><![CDATA[vbUseSystemDayOfWeek]]></category>

		<guid isPermaLink="false">http://www.jpsoftwaretech.com/?p=2395</guid>
		<description><![CDATA[<p>In Create Followup Task Reminders with VBA and Using Excel VBA to set up Task Reminders in Outlook there is a function for calculating the next business day, N days ahead. It is used to create task reminders programmatically by adding N days to the current date, then adjusting the resulting date forward to a<br /><em>Continue Reading:</em> <a class="more-link" href="http://www.jpsoftwaretech.com/get-previous-business-day-in-vba/">Get Previous Business Day in VBA &#187;</a></p><p><a href="http://www.jpsoftwaretech.com/get-previous-business-day-in-vba/">Get Previous Business Day in VBA</a> is Copyright © <a href="http://www.jpsoftwaretech.com">JP Software Technologies</a>. All Rights Reserved.</p>]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.jpsoftwaretech.com/outlook-vba/create-followup-task-reminders-with-vba/">Create Followup Task Reminders with VBA</a> and <a href="http://www.jpsoftwaretech.com/using-excel-vba-to-set-up-task-reminders-in-outlook/">Using Excel VBA to set up Task Reminders in Outlook</a> there is a function for calculating the next business day, N days ahead.<br />
<span id="more-2395"></span><br />
It is used to create task reminders programmatically by adding N days to the current date, then adjusting the resulting date forward to a weekday.</p>
<p>But we have no matching function for going back in time to calculate business days prior to a given date. So I've written a function that does so, as well as improved the previous function for calculating the next business day.</p>
<h3>Previous Business Day Function</h3>
<p>The following function accepts a date and (optional) the number of days to go back. If no amount is specified, it is assumed that you want the previous business day. No adjustment is made for holidays.</p>
<pre class="brush: vb; title: Code:; notranslate">Function PreviousBusinessDay(dateFrom As Date, _
    Optional daysBack As Long = 1) As Date
  Dim currentDate As Date
  Dim previousDate As Date

  ' convert pos to neg
  If daysBack &gt; 0 Then
    daysBack = -daysBack
  End If

  ' determine previous date
  currentDate = dateFrom
  previousDate = DateAdd(&quot;d&quot;, daysBack, currentDate)

  ' was previous date a weekend day?
  Select Case Weekday(previousDate, vbUseSystemDayOfWeek)
  Case vbSunday
    previousDate = DateAdd(&quot;d&quot;, -2, previousDate)
  Case vbSaturday
    previousDate = DateAdd(&quot;d&quot;, -1, previousDate)
  End Select

  PreviousBusinessDay = CDate(Int(previousDate))

End Function</pre>
<p>To specify a date for the function, use any native function, variable or constant that returns a Date type.</p>
<h4>Usage</h4>
<pre class="brush: vb; title: Code:; notranslate">PreviousBusinessDay(#5/9/2012#)
PreviousBusinessDay(CDate(&quot;5/9/2012&quot;))
PreviousBusinessDay(Now)</pre>
<p>You can specify either a positive or negative number to go back. In case you forget, the function changes positive to negative numbers for you. </p>
<p>No assumption is made about the first day of your week &#8212;  the work week as specified locally is used to determine if the previous business days falls on the "weekend". (If you are having trouble falling asleep you can read more about the <a href="http://msdn.microsoft.com/en-us/goglobal/bb896001">NLS API here</a>). I have not tested this, and I have no idea where to change the local work-week setting, but it is supposed to be locale-independent so I would love to know if it works properly in other locales. You can of course change this from <var>vbUseSystemDayOfWeek</var> to whatever is the first day of your work week.</p>
<h3>A better Next Business Day Function</h3>
<p>Following is my improved version of the next business day function I linked to earlier.</p>
<pre class="brush: vb; title: Code:; notranslate">Function NextBusinessDay(dateFrom As Date, _
    Optional daysAhead As Long = 1) As Date
  Dim currentDate As Date
  Dim nextDate As Date

  ' convert neg to pos
  If daysAhead &lt; 0 Then
    daysAhead = Abs(daysAhead)
  End If

  ' determine next date
  currentDate = dateFrom
  nextDate = DateAdd(&quot;d&quot;, daysAhead, currentDate)

  ' is next date a weekend day?
  Select Case Weekday(nextDate, vbUseSystemDayOfWeek)
  Case vbSunday
    nextDate = DateAdd(&quot;d&quot;, 1, nextDate)
  Case vbSaturday
    nextDate = DateAdd(&quot;d&quot;, 2, nextDate)
  End Select

  NextBusinessDay = CDate(Int(nextDate))

End Function</pre>
<p>This function has several advantages over the previous, er, next function:</p>
<ul>
<li>You can specify number of business days to advance, or call the function with just a date to get the very next business day</li>
<li>Uses <var>DateAdd</var> consistently instead of waffling between <var>DateAdd</var> and simple math</li>
<li>Should automatically adjust to local settings</li>
<li>Drops that silly variable prefixing habit</li>
</ul>
<h4>Usage</h4>
<pre class="brush: vb; title: Code:; notranslate">NextBusinessDay(#5/9/2012#)
NextBusinessDay(CDate(&quot;5/9/2012&quot;))
NextBusinessDay(Now)</pre>
<p>One thing I am not happy with, however, is the hardcoding of the date math, if adjustment be necessary. I feel like there should be some way to programmatically calculate how many days to add, but I can't figure out how. I'll settle for hardcoding for now.</p>
<p><a href="http://www.jpsoftwaretech.com/get-previous-business-day-in-vba/">Get Previous Business Day in VBA</a> is Copyright © <a href="http://www.jpsoftwaretech.com">JP Software Technologies</a>. All Rights Reserved.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=3E_LAVmRMZM:yBtcuQOcwVs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=3E_LAVmRMZM:yBtcuQOcwVs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=3E_LAVmRMZM:yBtcuQOcwVs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=3E_LAVmRMZM:yBtcuQOcwVs:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=3E_LAVmRMZM:yBtcuQOcwVs:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=3E_LAVmRMZM:yBtcuQOcwVs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=3E_LAVmRMZM:yBtcuQOcwVs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=3E_LAVmRMZM:yBtcuQOcwVs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=3E_LAVmRMZM:yBtcuQOcwVs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=3E_LAVmRMZM:yBtcuQOcwVs:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CodeForExcelAndOutlook/~4/3E_LAVmRMZM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss />
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Is there such a thing as bad programming code?</title>
		<link>http://www.jpsoftwaretech.com/is-there-such-a-thing-as-bad-programming-code/</link>
		<comments>http://www.jpsoftwaretech.com/is-there-such-a-thing-as-bad-programming-code/#comments</comments>
		<pubDate>Thu, 03 May 2012 11:00:08 +0000</pubDate>
		<dc:creator>JP</dc:creator>
				<category><![CDATA[Rant]]></category>
		<category><![CDATA[bad]]></category>
		<category><![CDATA[best practice]]></category>

		<guid isPermaLink="false">http://www.jpsoftwaretech.com/?p=2392</guid>
		<description><![CDATA[<p>I'm sure this is something that has been discussed somewhere, or maybe you've thought about it. Can there be such a thing as "bad" programming code? We have all encountered code that made us say something like "What was he thinking?" "Why did he do that instead of using X method?" (X being a built-in<br /><em>Continue Reading:</em> <a class="more-link" href="http://www.jpsoftwaretech.com/is-there-such-a-thing-as-bad-programming-code/">Is there such a thing as bad programming code? &#187;</a></p><p><a href="http://www.jpsoftwaretech.com/is-there-such-a-thing-as-bad-programming-code/">Is there such a thing as bad programming code?</a> is Copyright © <a href="http://www.jpsoftwaretech.com">JP Software Technologies</a>. All Rights Reserved.</p>]]></description>
			<content:encoded><![CDATA[<p>I'm sure this is something that has been discussed somewhere, or maybe you've thought about it.</p>
<p>Can there be such a thing as "bad" programming code?<br />
<span id="more-2392"></span><br />
We have all encountered code that made us say something like</p>
<ul>
<li>"What was he thinking?"</li>
<li>"Why did he do that instead of using <em>X</em> method?" (<em>X</em> being a built-in method that already does what the code does manually)</li>
</ul>
<p>But is it <strong>bad</strong> programming?</p>
<p>We all know there are usually a dozen ways to do any given task in VBA. Some are more efficient than others. Some ways result in less code. Some ways follow best practice. These usually overlap. What do you consider a "good" piece of code?</p>
<ul>
<li>Short?</li>
<li>Most efficient?</li>
<li>Outside the box?</li>
</ul>
<p>Just because a piece of code is long or inefficient or reinvents the wheel, it may still work. Some people might say there are only two kinds of programming code: <em>good code and code that doesn't work</em>. If the code works, can it ever be called bad?</p>
<p>If the code is a little bit slow or does some looping, can it be called bad?</p>
<p>For example, if I write this statement:</p>
<pre class="brush: vb; title: Code:; notranslate">Dim workbookName, worksheetName As String</pre>
<p>Is this bad code if I use both variables to hold strings? I mean, the code will still work, it may be a few milliseconds slower, it may not be the King's VBA, so what's the problem? I may have copied this from another website without knowing that it really means</p>
<pre class="brush: vb; title: Code:; notranslate">Dim workbookName As Variant, worksheetName As String</pre>
<p>At what point does code technically become bad? Is it possible, simply by looking at the above line, to determine whether the writer is honestly ignorant about how to properly declare variables? Or is the code just <em>prima facie</em> bad?</p>
<p>I have come to the belief that there <strong>is</strong> such a thing as bad code. Ex:</p>
<ul>
<li>Multiple hardcoded values (whether it is magic numbers or version-specific hardcoding)</li>
<li>Writing ("creating") code that does what built-in methods already do</li>
<li>Looping through worksheet ranges instead of arrays</li>
<li>Localized code</li>
</ul>
<p>One of my pet peeves is code that is <a href="http://www.pcmag.com/encyclopedia_term/0,1233,t=tight+coupling&#038;i=58216,00.asp">tightly coupled</a> with a particular workbook. The code is typically <a href="http://stackoverflow.com/faq#close">localized</a> and will not work in any other environment without extensive modification.</p>
<p>This annoys me because the code is almost useless. It is only being shown to <a href="http://typicalprogrammer.com/?p=4">show off</a> or demonstrate some marginal coding technique that almost nobody will ever need to use. The code relies on a very specific workbook setup, and the slightest deviation will cause the code to fail. The chances of anyone (other than the author) being able to actually use it as-is are low. We've all been to training classes where the trainer only shows you what he wants you to see and can't answer the simplest question that falls outside of the predetermined agenda. (psst: you're not supposed to ask those kinds of questions)</p>
<p>If your code only works for you, keep it to yourself. I consider localized code "bad" not because it doesn't work, but because it's been posted in public yet has a severely limited scope. When I see this kind of code, I have trouble keeping my fingers off the keyboard.</p>
<p>Although my instinct is to immediately attribute this type of coding to <a href="http://allpsych.com/psychology101/attribution_attraction.html">ignorance</a>, after reading <a href="http://net.tutsplus.com/tutorials/php/why-youre-a-bad-php-programmer/">Why You’re a Bad PHP Programmer</a> I've realized that I probably have a self-serving bias. I understand that there are a lot of circumstances other than bad intent that could lead someone to write bad code. I know I've written plenty of code that is pretty scary looking to others, without having bad intentions. It may be an innocent series of <a href="http://net.tutsplus.com/tutorials/php/why-youre-a-bad-php-programmer/">concessions</a> that leads to the abominations I've given birth to.</p>
<p>Do you do any of the things that could land you in the programming doghouse? Things like</p>
<ul>
<li>writing poor comments &#8212; you literally explain what the code is doing (which should be obvious from the code itself) instead of sectional commenting that explains the purpose of the code?</li>
<li>writing "Dim workbookName, worksheetName As String" instead of "Dim workbookName As String, worksheetName As String" or similar things which, while technically correct, are inefficient?</li>
<li>publishing code that only works under very limited conditions and can't be cut and pasted elsewhere?</li>
</ul>
<p>Do you think there is such a thing as bad code? If so, what do you consider bad?</p>
<p><a href="http://www.jpsoftwaretech.com/is-there-such-a-thing-as-bad-programming-code/">Is there such a thing as bad programming code?</a> is Copyright © <a href="http://www.jpsoftwaretech.com">JP Software Technologies</a>. All Rights Reserved.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=uV_jnnyRvlk:fM2w-Zx5aoU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=uV_jnnyRvlk:fM2w-Zx5aoU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=uV_jnnyRvlk:fM2w-Zx5aoU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=uV_jnnyRvlk:fM2w-Zx5aoU:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=uV_jnnyRvlk:fM2w-Zx5aoU:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=uV_jnnyRvlk:fM2w-Zx5aoU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=uV_jnnyRvlk:fM2w-Zx5aoU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=uV_jnnyRvlk:fM2w-Zx5aoU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?a=uV_jnnyRvlk:fM2w-Zx5aoU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CodeForExcelAndOutlook?i=uV_jnnyRvlk:fM2w-Zx5aoU:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CodeForExcelAndOutlook/~4/uV_jnnyRvlk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss />
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

