<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>This Old Code - XML</title>
    <link>http://thisoldcode.net/</link>
    <description>(Architecture + Development) ^ Testing = Product </description>
    <language>en-us</language>
    <copyright>Aaron Fischer</copyright>
    <lastBuildDate>Tue, 29 May 2007 15:36:12 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>aaron@microfisch.com</managingEditor>
    <webMaster>aaron@microfisch.com</webMaster>
    <item>
      <trackback:ping>http://thisoldcode.net/Trackback.aspx?guid=9e078407-18df-43be-a986-a1e261d07f3e</trackback:ping>
      <pingback:server>http://thisoldcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://thisoldcode.net/PermaLink,guid,9e078407-18df-43be-a986-a1e261d07f3e.aspx</pingback:target>
      <dc:creator>Aaron Fischer</dc:creator>
      <wfw:comment>http://thisoldcode.net/CommentView,guid,9e078407-18df-43be-a986-a1e261d07f3e.aspx</wfw:comment>
      <wfw:commentRss>http://thisoldcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=9e078407-18df-43be-a986-a1e261d07f3e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
Erika wrote a couple posts worth a look regarding Data driven document generation.
</p>
        <p>
          <a href="http://blogs.msdn.com/erikaehrli/archive/2006/08/11/word2007DataDocumentGenerationPart1.aspx">Data-driven
document generation with Word 2007 and the Office XML File Formats: Part 1</a>
        </p>
        <p>
        </p>
        <p>
          <a href="http://blogs.msdn.com/erikaehrli/archive/2006/08/16/word2007DataDocumentGenerationPart2.aspx">Data-driven
document generation with Word 2007 and the Office XML File Formats: Part 2</a>
        </p>
        <p>
        </p>
        <p>
Also If you wanted to take a Mail Merge word doc and port it over to XML 
</p>
        <p>
          <a href="http://blogs.msdn.com/microsoft_office_word/archive/2007/03/28/migrating-mail-merge-fields-to-content-controls.aspx" target="_blank">Migrating
Mail Merge Fields to Content Controls</a> ( I republished the code so that its
legible)
</p>
        <p>
 
</p>
        <blockquote>
          <pre class="csharpcode">
            <span class="kwrd">Private</span>
            <span class="kwrd">Sub</span> Document_Open() <span class="kwrd">If</span> (MsgBox(<span class="str">"Convert
Mail Merge fields to Content Controls?"</span>, vbYesNo, <span class="str">"Convert
Mail Merge Fields"</span>) = vbYes) <span class="kwrd">Then</span> ConvertMailMergeFields <span class="kwrd">End</span><span class="kwrd">If</span><span class="kwrd">End</span><span class="kwrd">Sub</span><span class="rem">'**
Traverse Mail Merge fields collection and convert each mail merge field into a content
control</span><span class="rem">'** while preserving its font style and format.</span><span class="kwrd">Private</span><span class="kwrd">Sub</span> ConvertMailMergeFields() <span class="kwrd">Dim</span> i <span class="kwrd">As</span><span class="kwrd">Integer</span>,
Count <span class="kwrd">As</span><span class="kwrd">Integer</span><span class="kwrd">Dim</span> currentFont <span class="kwrd">As</span> Font <span class="kwrd">Dim</span> mergeFieldname <span class="kwrd">As</span><span class="kwrd">String</span><span class="kwrd">Dim</span> field <span class="kwrd">As</span> MailMergeField <span class="kwrd">For</span><span class="kwrd">Each</span> field <span class="kwrd">In</span> ActiveDocument.MailMerge.Fields <span class="rem">'**
Select Mail Merge field to process.</span> field.<span class="kwrd">Select</span><span class="kwrd">Set</span> currentFont
= Selection.Font <span class="rem">'** Set name for content control.</span> mergeFieldname
= GetMailMergeFieldName(field.Code) Debug.Print (<span class="str">"Processing ["</span> &amp;
mergeFieldname &amp; <span class="str">"]"</span>) <span class="rem">'** Remove Mail
Merge field and replace it with addition of new content control.</span> Selection.Cut <span class="rem">'**
Add new content control.</span> AddContentControl mergeFieldname, currentFont Count
= Count + 1 <span class="kwrd">Next</span> Debug.Print (<span class="str">"Number
of Mail Merge Fields converted to Content Controls: "</span> &amp; Count) <span class="kwrd">End</span><span class="kwrd">Sub</span><span class="rem">'**
Add new content control.</span><span class="kwrd">Private</span><span class="kwrd">Sub</span> AddContentControl(<span class="kwrd">ByVal</span> mergeFieldname <span class="kwrd">As</span><span class="kwrd">String</span>, <span class="kwrd">ByVal</span> currentFont <span class="kwrd">As</span> Font) <span class="kwrd">Dim</span> newControl <span class="kwrd">As</span> ContentControl <span class="kwrd">Dim</span> fontStyleName <span class="kwrd">As</span><span class="kwrd">String</span><span class="kwrd">Set</span> newControl
= ActiveDocument.ContentControls.Add(wdContentControlText) <span class="rem">'** The
Title property only allows for 64 characters.</span><span class="rem">'** If name
is longer, we will put the rest in the Tag property.</span><span class="kwrd">If</span> (Len(mergeFieldname)
&lt; 64) <span class="kwrd">Then</span> newControl.Title = mergeFieldname newControl.Tag
= <span class="str">""</span><span class="kwrd">Else</span> newControl.Title = Mid(mergeFieldname,
1, 64) newControl.Tag = Mid(mergeFieldname, 65, Len(mergeFieldname) - 64) <span class="kwrd">End</span><span class="kwrd">If</span> newControl.SetPlaceholderText
, , <span class="str">"Click to add."</span><span class="rem">'** Set font for content
control.</span> fontStyleName = GetFontStyleName(currentFont) SetFontStyle newControl,
fontStyleName, currentFont <span class="rem">'** Allow carriage return.</span> newControl.MultiLine
= <span class="kwrd">True</span><span class="kwrd">End</span><span class="kwrd">Sub</span><span class="rem">'**
Quick and dirty way to check to see if the given font style exist; if it does not,
create it.</span><span class="kwrd">Private</span><span class="kwrd">Sub</span> SetFontStyle(<span class="kwrd">ByRef</span> newControl <span class="kwrd">As</span> ContentControl, <span class="kwrd">ByVal</span> fontStyleName <span class="kwrd">As</span><span class="kwrd">String</span>, <span class="kwrd">ByVal</span> currentFont <span class="kwrd">As</span> Font) <span class="kwrd">On</span><span class="kwrd">Error</span><span class="kwrd">GoTo</span> Error_FontStyleDoesNotExist
newControl.DefaultTextStyle = fontStyleName <span class="kwrd">Exit</span><span class="kwrd">Sub</span> Error_FontStyleDoesNotExist:
AddNewFontStyle fontStyleName, currentFont newControl.DefaultTextStyle = fontStyleName <span class="kwrd">End</span><span class="kwrd">Sub</span><span class="kwrd">Private</span><span class="kwrd">Sub</span> AddNewFontStyle(<span class="kwrd">ByVal</span> newFontStyleName <span class="kwrd">As</span><span class="kwrd">String</span>, <span class="kwrd">ByVal</span> currentFont <span class="kwrd">As</span> Font) <span class="kwrd">Dim</span> fontStyle <span class="kwrd">As</span> Style <span class="kwrd">Set</span> fontStyle
= ActiveDocument.Styles.Add(newFontStyleName) <span class="kwrd">With</span> currentFont
fontStyle.Font.Name = .Name fontStyle.Font.Size = .Size fontStyle.Font.Bold = .Bold
fontStyle.Font.Italic = .Italic <span class="kwrd">End</span><span class="kwrd">With</span><span class="kwrd">End</span><span class="kwrd">Sub</span><span class="kwrd">Private</span><span class="kwrd">Function</span> GetFontStyleName(<span class="kwrd">ByVal</span> currentFont <span class="kwrd">As</span> Font) <span class="kwrd">As</span><span class="kwrd">String</span><span class="kwrd">Dim</span> fontStyleName <span class="kwrd">As</span><span class="kwrd">String</span><span class="kwrd">With</span> currentFont
fontStyleName = .Name fontStyleName = fontStyleName &amp; .Size fontStyleName = fontStyleName
&amp; .Bold fontStyleName = fontStyleName &amp; .Italic <span class="kwrd">End</span><span class="kwrd">With</span><span class="rem">'**
Return result.</span> GetFontStyleName = fontStyleName <span class="kwrd">End</span><span class="kwrd">Function</span><span class="kwrd">Private</span><span class="kwrd">Function</span> GetMailMergeFieldName(<span class="kwrd">ByVal</span> fieldCode <span class="kwrd">As</span><span class="kwrd">String</span>) <span class="kwrd">As</span><span class="kwrd">String</span><span class="kwrd">Dim</span> mergeFieldname <span class="kwrd">As</span><span class="kwrd">String</span>:
mergeFieldname = <span class="str">""</span><span class="rem">'** Name of Mail merge
field: MERGEFIELD MailMergeFieldName \* MERGEFORMAT</span> mergeFieldname = Replace(fieldCode, <span class="str">"MERGEFIELD"</span>, <span class="str">""</span>)
mergeFieldname = Replace(mergeFieldname, <span class="str">"\* MERGEFORMAT"</span>, <span class="str">""</span>)
mergeFieldname = Trim(mergeFieldname) <span class="rem">'** Return result.</span> GetMailMergeFieldName
= mergeFieldname <span class="kwrd">End</span> Function</pre>
        </blockquote>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <img width="0" height="0" src="http://thisoldcode.net/aggbug.ashx?id=9e078407-18df-43be-a986-a1e261d07f3e" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.MicroFisch.com">MicroFisch</a>.</body>
      <title>Data driven document generation with Word 2007</title>
      <guid isPermaLink="false">http://thisoldcode.net/PermaLink,guid,9e078407-18df-43be-a986-a1e261d07f3e.aspx</guid>
      <link>http://thisoldcode.net/PermaLink,guid,9e078407-18df-43be-a986-a1e261d07f3e.aspx</link>
      <pubDate>Tue, 29 May 2007 15:36:12 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Erika wrote a couple posts worth a look regarding Data driven document generation.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.msdn.com/erikaehrli/archive/2006/08/11/word2007DataDocumentGenerationPart1.aspx"&gt;Data-driven
document generation with Word 2007 and the Office XML File Formats: Part 1&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.msdn.com/erikaehrli/archive/2006/08/16/word2007DataDocumentGenerationPart2.aspx"&gt;Data-driven
document generation with Word 2007 and the Office XML File Formats: Part 2&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Also If you wanted to take a Mail Merge word doc and port it over to XML 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.msdn.com/microsoft_office_word/archive/2007/03/28/migrating-mail-merge-fields-to-content-controls.aspx" target="_blank"&gt;Migrating
Mail Merge Fields to Content Controls&lt;/a&gt;&amp;nbsp;( I republished the code so that its
legible)
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; Document_Open() &lt;span class="kwrd"&gt;If&lt;/span&gt; (MsgBox(&lt;span class="str"&gt;"Convert
Mail Merge fields to Content Controls?"&lt;/span&gt;, vbYesNo, &lt;span class="str"&gt;"Convert
Mail Merge Fields"&lt;/span&gt;) = vbYes) &lt;span class="kwrd"&gt;Then&lt;/span&gt; ConvertMailMergeFields &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt; &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; &lt;span class="rem"&gt;'**
Traverse Mail Merge fields collection and convert each mail merge field into a content
control&lt;/span&gt; &lt;span class="rem"&gt;'** while preserving its font style and format.&lt;/span&gt; &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; ConvertMailMergeFields() &lt;span class="kwrd"&gt;Dim&lt;/span&gt; i &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt;,
Count &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt; &lt;span class="kwrd"&gt;Dim&lt;/span&gt; currentFont &lt;span class="kwrd"&gt;As&lt;/span&gt; Font &lt;span class="kwrd"&gt;Dim&lt;/span&gt; mergeFieldname &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt; &lt;span class="kwrd"&gt;Dim&lt;/span&gt; field &lt;span class="kwrd"&gt;As&lt;/span&gt; MailMergeField &lt;span class="kwrd"&gt;For&lt;/span&gt; &lt;span class="kwrd"&gt;Each&lt;/span&gt; field &lt;span class="kwrd"&gt;In&lt;/span&gt; ActiveDocument.MailMerge.Fields &lt;span class="rem"&gt;'**
Select Mail Merge field to process.&lt;/span&gt; field.&lt;span class="kwrd"&gt;Select&lt;/span&gt; &lt;span class="kwrd"&gt;Set&lt;/span&gt; currentFont
= Selection.Font &lt;span class="rem"&gt;'** Set name for content control.&lt;/span&gt; mergeFieldname
= GetMailMergeFieldName(field.Code) Debug.Print (&lt;span class="str"&gt;"Processing ["&lt;/span&gt; &amp;amp;
mergeFieldname &amp;amp; &lt;span class="str"&gt;"]"&lt;/span&gt;) &lt;span class="rem"&gt;'** Remove Mail
Merge field and replace it with addition of new content control.&lt;/span&gt; Selection.Cut &lt;span class="rem"&gt;'**
Add new content control.&lt;/span&gt; AddContentControl mergeFieldname, currentFont Count
= Count + 1 &lt;span class="kwrd"&gt;Next&lt;/span&gt; Debug.Print (&lt;span class="str"&gt;"Number
of Mail Merge Fields converted to Content Controls: "&lt;/span&gt; &amp;amp; Count) &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; &lt;span class="rem"&gt;'**
Add new content control.&lt;/span&gt; &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; AddContentControl(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; mergeFieldname &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;, &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; currentFont &lt;span class="kwrd"&gt;As&lt;/span&gt; Font) &lt;span class="kwrd"&gt;Dim&lt;/span&gt; newControl &lt;span class="kwrd"&gt;As&lt;/span&gt; ContentControl &lt;span class="kwrd"&gt;Dim&lt;/span&gt; fontStyleName &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt; &lt;span class="kwrd"&gt;Set&lt;/span&gt; newControl
= ActiveDocument.ContentControls.Add(wdContentControlText) &lt;span class="rem"&gt;'** The
Title property only allows for 64 characters.&lt;/span&gt; &lt;span class="rem"&gt;'** If name
is longer, we will put the rest in the Tag property.&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt; (Len(mergeFieldname)
&amp;lt; 64) &lt;span class="kwrd"&gt;Then&lt;/span&gt; newControl.Title = mergeFieldname newControl.Tag
= &lt;span class="str"&gt;""&lt;/span&gt; &lt;span class="kwrd"&gt;Else&lt;/span&gt; newControl.Title = Mid(mergeFieldname,
1, 64) newControl.Tag = Mid(mergeFieldname, 65, Len(mergeFieldname) - 64) &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt; newControl.SetPlaceholderText
, , &lt;span class="str"&gt;"Click to add."&lt;/span&gt; &lt;span class="rem"&gt;'** Set font for content
control.&lt;/span&gt; fontStyleName = GetFontStyleName(currentFont) SetFontStyle newControl,
fontStyleName, currentFont &lt;span class="rem"&gt;'** Allow carriage return.&lt;/span&gt; newControl.MultiLine
= &lt;span class="kwrd"&gt;True&lt;/span&gt; &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; &lt;span class="rem"&gt;'**
Quick and dirty way to check to see if the given font style exist; if it does not,
create it.&lt;/span&gt; &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; SetFontStyle(&lt;span class="kwrd"&gt;ByRef&lt;/span&gt; newControl &lt;span class="kwrd"&gt;As&lt;/span&gt; ContentControl, &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; fontStyleName &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;, &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; currentFont &lt;span class="kwrd"&gt;As&lt;/span&gt; Font) &lt;span class="kwrd"&gt;On&lt;/span&gt; &lt;span class="kwrd"&gt;Error&lt;/span&gt; &lt;span class="kwrd"&gt;GoTo&lt;/span&gt; Error_FontStyleDoesNotExist
newControl.DefaultTextStyle = fontStyleName &lt;span class="kwrd"&gt;Exit&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; Error_FontStyleDoesNotExist:
AddNewFontStyle fontStyleName, currentFont newControl.DefaultTextStyle = fontStyleName &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; AddNewFontStyle(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; newFontStyleName &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;, &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; currentFont &lt;span class="kwrd"&gt;As&lt;/span&gt; Font) &lt;span class="kwrd"&gt;Dim&lt;/span&gt; fontStyle &lt;span class="kwrd"&gt;As&lt;/span&gt; Style &lt;span class="kwrd"&gt;Set&lt;/span&gt; fontStyle
= ActiveDocument.Styles.Add(newFontStyleName) &lt;span class="kwrd"&gt;With&lt;/span&gt; currentFont
fontStyle.Font.Name = .Name fontStyle.Font.Size = .Size fontStyle.Font.Bold = .Bold
fontStyle.Font.Italic = .Italic &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;With&lt;/span&gt; &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; GetFontStyleName(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; currentFont &lt;span class="kwrd"&gt;As&lt;/span&gt; Font) &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt; &lt;span class="kwrd"&gt;Dim&lt;/span&gt; fontStyleName &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt; &lt;span class="kwrd"&gt;With&lt;/span&gt; currentFont
fontStyleName = .Name fontStyleName = fontStyleName &amp;amp; .Size fontStyleName = fontStyleName
&amp;amp; .Bold fontStyleName = fontStyleName &amp;amp; .Italic &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;With&lt;/span&gt; &lt;span class="rem"&gt;'**
Return result.&lt;/span&gt; GetFontStyleName = fontStyleName &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; GetMailMergeFieldName(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; fieldCode &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;) &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt; &lt;span class="kwrd"&gt;Dim&lt;/span&gt; mergeFieldname &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;:
mergeFieldname = &lt;span class="str"&gt;""&lt;/span&gt; &lt;span class="rem"&gt;'** Name of Mail merge
field: MERGEFIELD MailMergeFieldName \* MERGEFORMAT&lt;/span&gt; mergeFieldname = Replace(fieldCode, &lt;span class="str"&gt;"MERGEFIELD"&lt;/span&gt;, &lt;span class="str"&gt;""&lt;/span&gt;)
mergeFieldname = Replace(mergeFieldname, &lt;span class="str"&gt;"\* MERGEFORMAT"&lt;/span&gt;, &lt;span class="str"&gt;""&lt;/span&gt;)
mergeFieldname = Trim(mergeFieldname) &lt;span class="rem"&gt;'** Return result.&lt;/span&gt; GetMailMergeFieldName
= mergeFieldname &lt;span class="kwrd"&gt;End&lt;/span&gt; Function&lt;/pre&gt;
&lt;/blockquote&gt; &lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;img width="0" height="0" src="http://thisoldcode.net/aggbug.ashx?id=9e078407-18df-43be-a986-a1e261d07f3e" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.MicroFisch.com"&gt;MicroFisch&lt;/a&gt;.</description>
      <comments>http://thisoldcode.net/CommentView,guid,9e078407-18df-43be-a986-a1e261d07f3e.aspx</comments>
      <category>Microsoft</category>
      <category>VB</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>http://thisoldcode.net/Trackback.aspx?guid=968a3f66-9f03-487f-995d-e5060cd7f6c2</trackback:ping>
      <pingback:server>http://thisoldcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://thisoldcode.net/PermaLink,guid,968a3f66-9f03-487f-995d-e5060cd7f6c2.aspx</pingback:target>
      <dc:creator>Aaron Fischer</dc:creator>
      <wfw:comment>http://thisoldcode.net/CommentView,guid,968a3f66-9f03-487f-995d-e5060cd7f6c2.aspx</wfw:comment>
      <wfw:commentRss>http://thisoldcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=968a3f66-9f03-487f-995d-e5060cd7f6c2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://msdn2.microsoft.com/en-us/library/bb387098(VS.90).aspx">LINQ to XML</a>
        </p>
        <p>
          <a href="http://msdn2.microsoft.com/en-us/library/bb397926(VS.90).aspx">Language-Integrated
Query (LINQ)</a>
        </p>
        <img width="0" height="0" src="http://thisoldcode.net/aggbug.ashx?id=968a3f66-9f03-487f-995d-e5060cd7f6c2" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.MicroFisch.com">MicroFisch</a>.</body>
      <title>Beta Documentation for LINQ to XML</title>
      <guid isPermaLink="false">http://thisoldcode.net/PermaLink,guid,968a3f66-9f03-487f-995d-e5060cd7f6c2.aspx</guid>
      <link>http://thisoldcode.net/PermaLink,guid,968a3f66-9f03-487f-995d-e5060cd7f6c2.aspx</link>
      <pubDate>Mon, 21 May 2007 03:44:55 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/bb387098(VS.90).aspx"&gt;LINQ to XML&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/bb397926(VS.90).aspx"&gt;Language-Integrated
Query (LINQ)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://thisoldcode.net/aggbug.ashx?id=968a3f66-9f03-487f-995d-e5060cd7f6c2" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.MicroFisch.com"&gt;MicroFisch&lt;/a&gt;.</description>
      <comments>http://thisoldcode.net/CommentView,guid,968a3f66-9f03-487f-995d-e5060cd7f6c2.aspx</comments>
      <category>DotNet</category>
      <category>LINQ</category>
      <category>Microsoft</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>http://thisoldcode.net/Trackback.aspx?guid=a65cb89e-1808-4609-b7d0-da9fe7a56bac</trackback:ping>
      <pingback:server>http://thisoldcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://thisoldcode.net/PermaLink,guid,a65cb89e-1808-4609-b7d0-da9fe7a56bac.aspx</pingback:target>
      <dc:creator>Aaron Fischer</dc:creator>
      <wfw:comment>http://thisoldcode.net/CommentView,guid,a65cb89e-1808-4609-b7d0-da9fe7a56bac.aspx</wfw:comment>
      <wfw:commentRss>http://thisoldcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a65cb89e-1808-4609-b7d0-da9fe7a56bac</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It sounds like Microsoft's Consulting Services has extended  Mr.Walker's
OR-LOS for Commercial Lending.  If you have the time (28 minutes) its worth a
look but my overall impression is this could only be useful for a supper huge bank/lender
that has the IT staff to pull it off otherwise its just overly complicated. 
The question still remains how scalable and dependable this framework would be.
</p>
        <p>
        </p>
        <embed name="msn_soapbox" pluginspage="http://macromedia.com/go/getflashplayer" src="http://images.soapbox.msn.com/flash/soapbox1_1.swf" type="application/x-shockwave-flash" flashvars="c=v&amp;v=db86ec08-f911-4a2f-860c-366e428ac6e2" wmode="transparent" quality="high" height="362" width="412">
          <p>
          </p>
          <p>
            <br />
            <a title="Loan Origination Commercial Extension" href="http://soapbox.msn.com/video.aspx?vid=db86ec08-f911-4a2f-860c-366e428ac6e2" target="_new">Video:
Loan Origination Commercial Extension</a>
          </p>
          <p>
Also according to Mr. Walker Microsoft will increase its participation with industry
standards ( ie MISMO)
</p>
          <img width="0" height="0" src="http://thisoldcode.net/aggbug.ashx?id=a65cb89e-1808-4609-b7d0-da9fe7a56bac" />
          <br />
          <hr />
This weblog is sponsored by <a href="http://www.MicroFisch.com">MicroFisch</a>.
</embed>
      </body>
      <title>MCS use OR-LOS for Commercial Lending.</title>
      <guid isPermaLink="false">http://thisoldcode.net/PermaLink,guid,a65cb89e-1808-4609-b7d0-da9fe7a56bac.aspx</guid>
      <link>http://thisoldcode.net/PermaLink,guid,a65cb89e-1808-4609-b7d0-da9fe7a56bac.aspx</link>
      <pubDate>Wed, 11 Apr 2007 22:25:27 GMT</pubDate>
      <description>&lt;p&gt;
It sounds&amp;nbsp;like Microsoft's Consulting Services has extended &amp;nbsp;Mr.Walker's
OR-LOS for Commercial Lending.&amp;nbsp; If you have the time (28 minutes) its worth a
look but my overall impression is this could only be useful for a supper huge bank/lender
that has the IT staff to pull it off otherwise its just overly complicated.&amp;nbsp;
The question still remains how scalable and dependable this framework would be.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;embed name="msn_soapbox" pluginspage="http://macromedia.com/go/getflashplayer" src="http://images.soapbox.msn.com/flash/soapbox1_1.swf" type="application/x-shockwave-flash" flashvars="c=v&amp;amp;v=db86ec08-f911-4a2f-860c-366e428ac6e2" wmode="transparent" quality="high" height="362" width="412"&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
&lt;a title="Loan Origination Commercial Extension" href="http://soapbox.msn.com/video.aspx?vid=db86ec08-f911-4a2f-860c-366e428ac6e2" target="_new"&gt;Video:
Loan Origination Commercial Extension&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Also according to Mr. Walker Microsoft will increase its participation with industry
standards ( ie MISMO)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://thisoldcode.net/aggbug.ashx?id=a65cb89e-1808-4609-b7d0-da9fe7a56bac" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.MicroFisch.com"&gt;MicroFisch&lt;/a&gt;.</description>
      <comments>http://thisoldcode.net/CommentView,guid,a65cb89e-1808-4609-b7d0-da9fe7a56bac.aspx</comments>
      <category>Microsoft</category>
      <category>XML</category>
      <category>MISMO</category>
    </item>
    <item>
      <trackback:ping>http://thisoldcode.net/Trackback.aspx?guid=6bff69db-9566-4c2e-9a19-514b5413ec0e</trackback:ping>
      <pingback:server>http://thisoldcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://thisoldcode.net/PermaLink,guid,6bff69db-9566-4c2e-9a19-514b5413ec0e.aspx</pingback:target>
      <dc:creator>Aaron Fischer</dc:creator>
      <wfw:comment>http://thisoldcode.net/CommentView,guid,6bff69db-9566-4c2e-9a19-514b5413ec0e.aspx</wfw:comment>
      <wfw:commentRss>http://thisoldcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6bff69db-9566-4c2e-9a19-514b5413ec0e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Microsoft's XML Team just announced the <a href="http://blogs.msdn.com/xmlteam/archive/2007/03/22/xml-notepad-2007-version-2-3-is-now-available.aspx" target="_blank">release
of XML Notepad 2007 2.3</a></p>
        <p>
You can find the change log <a href="http://download.microsoft.com/download/6/e/e/6eef2361-33d4-48a2-b52e-5827c7f2ad68/Updates.xml" target="_blank">here</a> and
down load <a href="http://www.microsoft.com/downloads/details.aspx?familyid=72d6aa49-787d-4118-ba5f-4f30fe913628&amp;displaylang=en" target="_blank">here</a>.
</p>
        <p>
This is the new feature that caught my eye.
</p>
        <blockquote>
          <p>
            <em>"better handling of XML documents containing illegal characters"</em>
          </p>
        </blockquote>
        <img width="0" height="0" src="http://thisoldcode.net/aggbug.ashx?id=6bff69db-9566-4c2e-9a19-514b5413ec0e" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.MicroFisch.com">MicroFisch</a>.</body>
      <title>XML Notepad 2007 version 2.3</title>
      <guid isPermaLink="false">http://thisoldcode.net/PermaLink,guid,6bff69db-9566-4c2e-9a19-514b5413ec0e.aspx</guid>
      <link>http://thisoldcode.net/PermaLink,guid,6bff69db-9566-4c2e-9a19-514b5413ec0e.aspx</link>
      <pubDate>Fri, 23 Mar 2007 04:27:02 GMT</pubDate>
      <description>&lt;p&gt;
Microsoft's XML Team just announced the &lt;a href="http://blogs.msdn.com/xmlteam/archive/2007/03/22/xml-notepad-2007-version-2-3-is-now-available.aspx" target="_blank"&gt;release
of XML Notepad 2007 2.3&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You can find the change log &lt;a href="http://download.microsoft.com/download/6/e/e/6eef2361-33d4-48a2-b52e-5827c7f2ad68/Updates.xml" target="_blank"&gt;here&lt;/a&gt; and
down load &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=72d6aa49-787d-4118-ba5f-4f30fe913628&amp;amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
This is the new feature that caught my eye.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;em&gt;"better handling of XML documents containing illegal characters"&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt;&lt;img width="0" height="0" src="http://thisoldcode.net/aggbug.ashx?id=6bff69db-9566-4c2e-9a19-514b5413ec0e" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.MicroFisch.com"&gt;MicroFisch&lt;/a&gt;.</description>
      <comments>http://thisoldcode.net/CommentView,guid,6bff69db-9566-4c2e-9a19-514b5413ec0e.aspx</comments>
      <category>DotNet</category>
      <category>Microsoft</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>http://thisoldcode.net/Trackback.aspx?guid=eefb4db0-f1e6-4984-a7ba-725e0f8d60f7</trackback:ping>
      <pingback:server>http://thisoldcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://thisoldcode.net/PermaLink,guid,eefb4db0-f1e6-4984-a7ba-725e0f8d60f7.aspx</pingback:target>
      <dc:creator>Aaron Fischer</dc:creator>
      <wfw:comment>http://thisoldcode.net/CommentView,guid,eefb4db0-f1e6-4984-a7ba-725e0f8d60f7.aspx</wfw:comment>
      <wfw:commentRss>http://thisoldcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=eefb4db0-f1e6-4984-a7ba-725e0f8d60f7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I found another online <a href="http://codeconverter.sharpdevelop.net/Convert.aspx">code
converter</a> this time by <a href="http://sharpdevelop.com">SharpDevelop</a>. This
will convert between C#, VB,  and Boo.  They also have a <a href="http://codeconverter.sharpdevelop.net/ConvertService.asmx?op=PerformConversion">web
service</a>.<br /><br /><p></p><img width="0" height="0" src="http://thisoldcode.net/aggbug.ashx?id=eefb4db0-f1e6-4984-a7ba-725e0f8d60f7" /><br /><hr />
This weblog is sponsored by <a href="http://www.MicroFisch.com">MicroFisch</a>.</body>
      <title>Code Conversion Again</title>
      <guid isPermaLink="false">http://thisoldcode.net/PermaLink,guid,eefb4db0-f1e6-4984-a7ba-725e0f8d60f7.aspx</guid>
      <link>http://thisoldcode.net/PermaLink,guid,eefb4db0-f1e6-4984-a7ba-725e0f8d60f7.aspx</link>
      <pubDate>Sat, 17 Feb 2007 23:10:09 GMT</pubDate>
      <description>I found another online &lt;a href="http://codeconverter.sharpdevelop.net/Convert.aspx"&gt;code
converter&lt;/a&gt; this time by &lt;a href="http://sharpdevelop.com"&gt;SharpDevelop&lt;/a&gt;. This
will convert between C#, VB,&amp;nbsp; and Boo.&amp;nbsp; They also have a &lt;a href="http://codeconverter.sharpdevelop.net/ConvertService.asmx?op=PerformConversion"&gt;web
service&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://thisoldcode.net/aggbug.ashx?id=eefb4db0-f1e6-4984-a7ba-725e0f8d60f7" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.MicroFisch.com"&gt;MicroFisch&lt;/a&gt;.</description>
      <comments>http://thisoldcode.net/CommentView,guid,eefb4db0-f1e6-4984-a7ba-725e0f8d60f7.aspx</comments>
      <category>CSharp</category>
      <category>DotNet</category>
      <category>VB</category>
      <category>XML</category>
    </item>
  </channel>
</rss>