<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>dotnet thoughts &#187; Word</title>
	<atom:link href="http://www.dotnetthoughts.net/tag/word/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotnetthoughts.net</link>
	<description>a dotnet developer&#039;s technical blog</description>
	<lastBuildDate>Wed, 08 Feb 2012 03:18:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Calling word Macros from .Net</title>
		<link>http://www.dotnetthoughts.net/2007/09/20/calling-word-macros-from-net/</link>
		<comments>http://www.dotnetthoughts.net/2007/09/20/calling-word-macros-from-net/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 11:30:16 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Office Interoperability]]></category>
		<category><![CDATA[Interop]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[Word]]></category>

		<guid isPermaLink="false">http://anuraj.wordpress.com/2007/09/20/calling-word-macros-from-net/</guid>
		<description><![CDATA[While using Word automation with .Net sometimes it is required ti call, word macro&#8217;s from C# or VB.Net. Here is the code to call word macros from VB.Net. In the code, helloworld is the macro name.Or you can simply call &#8230; <a href="http://www.dotnetthoughts.net/2007/09/20/calling-word-macros-from-net/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While using Word automation with .Net sometimes it is required ti call, word macro&#8217;s from C# or VB.Net.</p>
<p>Here is the code to call word macros from VB.Net.</p>
<pre class="brush: vb; title: ; notranslate">
Dim WordApp As New Microsoft.Office.Interop.Word.Application
CType(WordApp, Object).GetType().InvokeMember(&quot;Run&quot;, Reflection.BindingFlags.Default Or Reflection.BindingFlags.InvokeMethod, Nothing, CType(WordApp, Object), New Object() {&quot;helloworld&quot;})
</pre>
<p>In the code, <em>helloworld</em> is the macro name.Or you can simply call <code>WordApp.Run("helloworld")</code> will also works fine.</p>
<p> </p>
<p>You can also refer link from Microsoft<br />
<a href="http://support.microsoft.com/kb/306683" target="_blank">http://support.microsoft.com/kb/306683</a></p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2008/04/25/printing-infopath-forms/" title="Permanent link to Printing Infopath forms">Printing Infopath forms</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2007/09/20/calling-word-macros-from-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

