<?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:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for XClave (or Chris' Blog)</title>
	<atom:link href="http://cskardon.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://cskardon.wordpress.com</link>
	<description>The world of Chris - a slightly deranged .NET developer....</description>
	<lastBuildDate>Fri, 16 Oct 2009 22:53:29 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Missing format specifier. by Greg</title>
		<link>http://cskardon.wordpress.com/2008/01/17/missing-format-specifier/#comment-56</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Fri, 16 Oct 2009 22:53:29 +0000</pubDate>
		<guid isPermaLink="false">http://cskardon.wordpress.com/2008/01/17/missing-format-specifier/#comment-56</guid>
		<description>First hit on google for &quot;missing format specifier&quot;! Thanks for the help.</description>
		<content:encoded><![CDATA[<p>First hit on google for &#8220;missing format specifier&#8221;! Thanks for the help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Printing a word document from C# &#8211; how the **** do you change the paper type??????? by JimBob</title>
		<link>http://cskardon.wordpress.com/2008/01/04/printing-a-word-document-from-c-how-the-do-you-change-the-paper-type/#comment-54</link>
		<dc:creator>JimBob</dc:creator>
		<pubDate>Wed, 23 Sep 2009 10:00:38 +0000</pubDate>
		<guid isPermaLink="false">http://cskardon.wordpress.com/2008/01/04/printing-a-word-document-from-c-how-the-do-you-change-the-paper-type/#comment-54</guid>
		<description>A long time after it was asked but here is how I have just done it.

printerURL is the \\printerserver\printer address 

paperTrayFirst and paperTrayNext are 
&quot;Tray 1&quot;  &quot;Tray 2&quot; etc
docSource is the full path/name of the document.

private void DoPrint(string printerURL, string paperTrayFirst, string paperTrayNext, string docSource)
        {

            PrintDocument pd = new PrintDocument();
            pd.PrinterSettings.PrinterName = printerURL;
            pd.DocumentName = docSource;
            PaperSource trayToUseFirst = null;
            PaperSource trayToUseNext = null;
            if(paperTrayFirst == &quot;-&quot;) paperTrayFirst = &quot;Tray 1&quot;;
            if(paperTrayNext == &quot;-&quot;) paperTrayNext = &quot;Tray 1&quot;;

            foreach (PaperSource source in pd.PrinterSettings.PaperSources)
            {
                if (source.SourceName.Trim().Equals(paperTrayFirst))
                {
                    trayToUseFirst = source;
                }
                if (source.SourceName.Trim().Equals(paperTrayNext))
                {
                    trayToUseNext = source;
                }

            }

            //if (pCap.StaplingCapability.Contains(Stapling.StapleDualLeft))
            //{
            //    printTicket.Stapling = Stapling.StapleDualLeft;
            //}
          
            int rawKindFirst = Convert.ToInt32(trayToUseFirst.GetType().GetField(&quot;kind&quot;, BindingFlags.Instance &#124; BindingFlags.NonPublic).GetValue(trayToUseFirst));
            m_wApp.ActiveDocument.PageSetup.FirstPageTray = (WdPaperTray)rawKindFirst;

            int rawKindNext = Convert.ToInt32(trayToUseNext.GetType().GetField(&quot;kind&quot;, BindingFlags.Instance &#124; BindingFlags.NonPublic).GetValue(trayToUseNext));
            m_wApp.ActiveDocument.PageSetup.OtherPagesTray = (WdPaperTray)rawKindNext;

            object printBackground = false;
            m_wApp.PrintOut(ref printBackground, ref missing, ref missing, ref missing, ref missing, ref missing,
                            ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
                            ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);

        }</description>
		<content:encoded><![CDATA[<p>A long time after it was asked but here is how I have just done it.</p>
<p>printerURL is the \\printerserver\printer address </p>
<p>paperTrayFirst and paperTrayNext are<br />
&#8220;Tray 1&#8243;  &#8220;Tray 2&#8243; etc<br />
docSource is the full path/name of the document.</p>
<p>private void DoPrint(string printerURL, string paperTrayFirst, string paperTrayNext, string docSource)<br />
        {</p>
<p>            PrintDocument pd = new PrintDocument();<br />
            pd.PrinterSettings.PrinterName = printerURL;<br />
            pd.DocumentName = docSource;<br />
            PaperSource trayToUseFirst = null;<br />
            PaperSource trayToUseNext = null;<br />
            if(paperTrayFirst == &#8220;-&#8221;) paperTrayFirst = &#8220;Tray 1&#8243;;<br />
            if(paperTrayNext == &#8220;-&#8221;) paperTrayNext = &#8220;Tray 1&#8243;;</p>
<p>            foreach (PaperSource source in pd.PrinterSettings.PaperSources)<br />
            {<br />
                if (source.SourceName.Trim().Equals(paperTrayFirst))<br />
                {<br />
                    trayToUseFirst = source;<br />
                }<br />
                if (source.SourceName.Trim().Equals(paperTrayNext))<br />
                {<br />
                    trayToUseNext = source;<br />
                }</p>
<p>            }</p>
<p>            //if (pCap.StaplingCapability.Contains(Stapling.StapleDualLeft))<br />
            //{<br />
            //    printTicket.Stapling = Stapling.StapleDualLeft;<br />
            //}</p>
<p>            int rawKindFirst = Convert.ToInt32(trayToUseFirst.GetType().GetField(&#8220;kind&#8221;, BindingFlags.Instance | BindingFlags.NonPublic).GetValue(trayToUseFirst));<br />
            m_wApp.ActiveDocument.PageSetup.FirstPageTray = (WdPaperTray)rawKindFirst;</p>
<p>            int rawKindNext = Convert.ToInt32(trayToUseNext.GetType().GetField(&#8220;kind&#8221;, BindingFlags.Instance | BindingFlags.NonPublic).GetValue(trayToUseNext));<br />
            m_wApp.ActiveDocument.PageSetup.OtherPagesTray = (WdPaperTray)rawKindNext;</p>
<p>            object printBackground = false;<br />
            m_wApp.PrintOut(ref printBackground, ref missing, ref missing, ref missing, ref missing, ref missing,<br />
                            ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,<br />
                            ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);</p>
<p>        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Missing format specifier. by Pankaj Sharma</title>
		<link>http://cskardon.wordpress.com/2008/01/17/missing-format-specifier/#comment-53</link>
		<dc:creator>Pankaj Sharma</dc:creator>
		<pubDate>Sat, 15 Aug 2009 13:57:01 +0000</pubDate>
		<guid isPermaLink="false">http://cskardon.wordpress.com/2008/01/17/missing-format-specifier/#comment-53</guid>
		<description>:-)

I hit the same thing today. However, while looking at the various sites that came up as a result of search on Google, I realized that the format specifiers were starting with a percent and then followed by a character rather than the other way around! I gave it a try and that worked! :-)

Thanks, but for making me feel that hadn&#039;t I figured it out, your page was there to help me out! :-)

Have a great day ahead!</description>
		<content:encoded><![CDATA[<p>:-)</p>
<p>I hit the same thing today. However, while looking at the various sites that came up as a result of search on Google, I realized that the format specifiers were starting with a percent and then followed by a character rather than the other way around! I gave it a try and that worked! :-)</p>
<p>Thanks, but for making me feel that hadn&#8217;t I figured it out, your page was there to help me out! :-)</p>
<p>Have a great day ahead!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Extensionising Wpf (or Chris&#8217; fun with Extension methods and Wpf) by capmusic</title>
		<link>http://cskardon.wordpress.com/2008/05/06/extensionising-wpf-or-chris-fun-with-extension-methods-and-wpf/#comment-52</link>
		<dc:creator>capmusic</dc:creator>
		<pubDate>Mon, 11 May 2009 18:46:46 +0000</pubDate>
		<guid isPermaLink="false">http://cskardon.wordpress.com/?p=28#comment-52</guid>
		<description>Great article. Sure explains my problem with creating Wpf windows from another thread.</description>
		<content:encoded><![CDATA[<p>Great article. Sure explains my problem with creating Wpf windows from another thread.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ternary operators don&#8217;t work with nullable value types? by adeel</title>
		<link>http://cskardon.wordpress.com/2008/02/26/ternary-operators-dont-work-with-nullable-value-types/#comment-51</link>
		<dc:creator>adeel</dc:creator>
		<pubDate>Mon, 27 Oct 2008 04:46:04 +0000</pubDate>
		<guid isPermaLink="false">http://cskardon.wordpress.com/?p=23#comment-51</guid>
		<description>The new features of .NET nullable value type is great.</description>
		<content:encoded><![CDATA[<p>The new features of .NET nullable value type is great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ternary operators don&#8217;t work with nullable value types? by Robin</title>
		<link>http://cskardon.wordpress.com/2008/02/26/ternary-operators-dont-work-with-nullable-value-types/#comment-50</link>
		<dc:creator>Robin</dc:creator>
		<pubDate>Thu, 17 Jul 2008 15:00:47 +0000</pubDate>
		<guid isPermaLink="false">http://cskardon.wordpress.com/?p=23#comment-50</guid>
		<description>I&#039;m not gonna take credit for this, but take a look at this!!!::

http://devlicio.us/blogs/alan_northam/archive/2008/03/06/ado-net-nullable-types-casting-dbnull-and-you.aspx


DateTime? myDt =  row[&quot;Column&quot;] as DateTime?;

The cast above is actually failing but casting with &quot;as&quot; doesn&#039;t throw an exception and returns a null value which is just what we want.

Spread the word!</description>
		<content:encoded><![CDATA[<p>I&#8217;m not gonna take credit for this, but take a look at this!!!::</p>
<p><a href="http://devlicio.us/blogs/alan_northam/archive/2008/03/06/ado-net-nullable-types-casting-dbnull-and-you.aspx" rel="nofollow">http://devlicio.us/blogs/alan_northam/archive/2008/03/06/ado-net-nullable-types-casting-dbnull-and-you.aspx</a></p>
<p>DateTime? myDt =  row["Column"] as DateTime?;</p>
<p>The cast above is actually failing but casting with &#8220;as&#8221; doesn&#8217;t throw an exception and returns a null value which is just what we want.</p>
<p>Spread the word!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Managed Application Framework &#8211; Part 1 &#8211; The Beginnings! by &#187; Managed Add-In Framework Jonathan Cisneros</title>
		<link>http://cskardon.wordpress.com/2008/04/08/managed-application-framework-part-1-the-beginnings/#comment-49</link>
		<dc:creator>&#187; Managed Add-In Framework Jonathan Cisneros</dc:creator>
		<pubDate>Mon, 16 Jun 2008 19:04:33 +0000</pubDate>
		<guid isPermaLink="false">http://cskardon.wordpress.com/?p=27#comment-49</guid>
		<description>[...] Managed Application Framework - Part 1 - The Beginnings! (this post has a quick MAF example) [...]</description>
		<content:encoded><![CDATA[<p>[...] Managed Application Framework &#8211; Part 1 &#8211; The Beginnings! (this post has a quick MAF example) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Managed Application Framework &#8211; Part 1 &#8211; The Beginnings! by Managed Application Framework - Part 2 - Basic Versioning! &#171; XClave (or Chris&#8217; Blog)</title>
		<link>http://cskardon.wordpress.com/2008/04/08/managed-application-framework-part-1-the-beginnings/#comment-43</link>
		<dc:creator>Managed Application Framework - Part 2 - Basic Versioning! &#171; XClave (or Chris&#8217; Blog)</dc:creator>
		<pubDate>Mon, 09 Jun 2008 14:12:03 +0000</pubDate>
		<guid isPermaLink="false">http://cskardon.wordpress.com/?p=27#comment-43</guid>
		<description>[...] June, 9 &#183; No Comments  Soooo&#8230; A post from a while ago covered the basic Managed Addin Framework (MAF from here-in) and how to set up a basic addin with host and [...]</description>
		<content:encoded><![CDATA[<p>[...] June, 9 &middot; No Comments  Soooo&#8230; A post from a while ago covered the basic Managed Addin Framework (MAF from here-in) and how to set up a basic addin with host and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Quicky re: Resharper and .NET 3.0 &#8211; CTRL+8 = Friend by BrankoH</title>
		<link>http://cskardon.wordpress.com/2007/11/29/quicky-re-resharper-and-net-30-ctrl8-friend/#comment-42</link>
		<dc:creator>BrankoH</dc:creator>
		<pubDate>Thu, 05 Jun 2008 18:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://cskardon.wordpress.com/2007/11/29/quicky-re-resharper-and-net-30-ctrl8-friend/#comment-42</guid>
		<description>ResharperDaemon is source code analyzer(strip next to vertical  scroll bar).</description>
		<content:encoded><![CDATA[<p>ResharperDaemon is source code analyzer(strip next to vertical  scroll bar).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ternary operators don&#8217;t work with nullable value types? by cskardon</title>
		<link>http://cskardon.wordpress.com/2008/02/26/ternary-operators-dont-work-with-nullable-value-types/#comment-41</link>
		<dc:creator>cskardon</dc:creator>
		<pubDate>Thu, 05 Jun 2008 07:12:46 +0000</pubDate>
		<guid isPermaLink="false">http://cskardon.wordpress.com/?p=23#comment-41</guid>
		<description>Ahh, I see, I guess it&#039;s being used to the implicit nature of most of C#... 

I still wouldn&#039;t expect to have to cast my results to the nullable types. It seems to go against how the rest work.

Alas, nice work though!</description>
		<content:encoded><![CDATA[<p>Ahh, I see, I guess it&#8217;s being used to the implicit nature of most of C#&#8230; </p>
<p>I still wouldn&#8217;t expect to have to cast my results to the nullable types. It seems to go against how the rest work.</p>
<p>Alas, nice work though!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
