<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>F# Scripting Zen – Word Interop</title><link>http://blogs.msdn.com/chrsmith/archive/2008/09/22/f-scripting-zen-word-interop.aspx</link><description>Edit: Added a ‘comarg’ function to dramatically clean up the syntax for doing COM-interop, since F# will pass ‘ref types’ as byrefs to COM calls. In a previous post I talked about how to take advantage of .FSX (F# Script) files to automate tasks for you.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>  F# Scripting Zen ??? Word Interop : EasyCoded</title><link>http://blogs.msdn.com/chrsmith/archive/2008/09/22/f-scripting-zen-word-interop.aspx#8961910</link><pubDate>Tue, 23 Sep 2008 07:21:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8961910</guid><dc:creator>  F# Scripting Zen ??? Word Interop : EasyCoded</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.easycoded.com/f-scripting-zen-%e2%80%93-word-interop/"&gt;http://www.easycoded.com/f-scripting-zen-%e2%80%93-word-interop/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: F# Scripting Zen – Word Interop</title><link>http://blogs.msdn.com/chrsmith/archive/2008/09/22/f-scripting-zen-word-interop.aspx#8962460</link><pubDate>Tue, 23 Sep 2008 19:43:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8962460</guid><dc:creator>Derek</dc:creator><description>&lt;p&gt;I recently did something similar with Excel interop. In my case, there was a need to connect to an already running instance of Excel, as it made edits to a sheet alongside user modifications. Not sure if Word uses the same model, but here's how I accomplished it:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;let application =&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(* connect to existing or start new *)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;let application = Marshal.GetActiveObject(&amp;quot;Excel.Application&amp;quot;) in&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if application = null then (new ApplicationClass() :&amp;gt; Application)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else (application :?&amp;gt; Application)&lt;/p&gt;
</description></item><item><title>re: F# Scripting Zen – Word Interop</title><link>http://blogs.msdn.com/chrsmith/archive/2008/09/22/f-scripting-zen-word-interop.aspx#9003909</link><pubDate>Sat, 18 Oct 2008 02:27:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9003909</guid><dc:creator>Erik</dc:creator><description>&lt;p&gt;com interop with F# - that's just awesome. Thanks for this. :)&lt;/p&gt;
</description></item></channel></rss>