Interoperability Scenarios: Technical Questions ForumDiscuss implementation of technical scenarios around interoperability© 2009 Microsoft Corporation. All rights reserved.Fri, 20 Nov 2009 17:26:03 Z16accb93-de95-4c0c-9992-b4749ebddbebhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/c588d06b-12fd-437a-8a11-8c62a1e9e363http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/c588d06b-12fd-437a-8a11-8c62a1e9e363Dejan Radisichttp://social.msdn.microsoft.com/Profile/en-US/?user=Dejan%20RadisicReusing Word instanceHi,<br/> <br/> I have an application that needs to use MS Word to open a document and save it in a different format. If there is already an instance of Word open, I want to reuse this process, otherwise I want to create a new one. So every time my application needs this Word instance it calls the following code:<br/> <pre lang="x-c#">private Microsoft.Office.Interop.Word.Application GetActiveApplication() { Microsoft.Office.Interop.Word.Application app = null; try { app = System.Runtime.InteropServices.Marshal.GetActiveObject(&quot;Word.Application&quot;) as Microsoft.Office.Interop.Word.Application; } catch (Exception ex) { // Log exception } if(app == null) app = new Microsoft.Office.Interop.Word.Application(); return (app); } </pre> So if Word wasn't opened yet or if someone shut it down in the meantime, this will create a new instance; otherwise it reuses the existing.<br/> This works well so far, but I was wondering if there is some cleanup code I should include here - whether for the case when I create a new instance or reuse the existing one? Just remember, I do not want to close the instance either way when I'm done with using it.<br/> <br/> Thanks.Fri, 20 Nov 2009 10:53:17 Z2009-11-20T17:26:03Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/c97bc207-38c8-4f07-9161-f10dae4e80a6http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/c97bc207-38c8-4f07-9161-f10dae4e80a6MyP3uKhttp://social.msdn.microsoft.com/Profile/en-US/?user=MyP3uKCannot invoke MSCOMMLib.MSComm through JavaScript in IE.<p class=MsoNormal>Cannot invoke <span><span style="font-size:10.0pt;line-height:115%;font-family:'Arial','sans-serif';color:black">MSCOMMLib.MSComm</span> through JavaScript in IE.</span></p> <p class=MsoNormal><span><span style="font-size:10.0pt;line-height:115%;font-family:'Arial','sans-serif';color:black">I need to interact with the hardware through the serial ports.<br/> I have a legacy code that had been working for quite a while on the web site, but it stopped working at all a couple of month ago on all of the client’s machines.<br/> <br/> </span></span></p> <p class=MsoNormal><span><span style="font-size:10.0pt;line-height:115%;font-family:'Arial','sans-serif';color:black">Here is the simplified version of the JavaScript code and markup on the page </span></span></p> <p class=MsoNormal><span><span style="font-size:10.0pt;line-height:115%;font-family:'Arial','sans-serif';color:black"> </span></span></p> <p class=MsoNormal><span><span style="font-size:10.0pt;line-height:115%;font-family:'Arial','sans-serif';color:black">MsComm control itself in the markup:</span></span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New';color:blue">&lt;</span><span style="font-size:10.0pt;font-family:'Courier New';color:#a31515">object</span><span style="font-size:10.0pt;font-family:'Courier New'"> <span style="color:red">id</span><span style="color:blue">=&quot;MsComm&quot;</span> <span style="color:red">classid</span><span style="color:blue">=&quot;CLSID:648A5600-2C6E-101B-82B6-000000000014&quot;</span> <span style="color:red">style</span><span style="color:blue">=&quot;</span><span style="color:red">display</span>: <span style="color:blue">none&quot;&gt;</span></span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                              </span><span style="color:blue">&lt;</span><span style="color:#a31515">param</span> <span style="color:red">name</span><span style="color:blue">=&quot;_ExtentX&quot;</span> <span style="color:red">value</span><span style="color:blue">=&quot;1005&quot;</span> <span style="color:blue">/&gt;</span></span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                              </span><span style="color:blue">&lt;</span><span style="color:#a31515">param</span> <span style="color:red">name</span><span style="color:blue">=&quot;_ExtentY&quot;</span> <span style="color:red">value</span><span style="color:blue">=&quot;1005&quot;</span> <span style="color:blue">/&gt;</span></span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                              </span><span style="color:blue">&lt;</span><span style="color:#a31515">param</span> <span style="color:red">name</span><span style="color:blue">=&quot;_Version&quot;</span> <span style="color:red">value</span><span style="color:blue">=&quot;393216&quot;</span> <span style="color:blue">/&gt;</span></span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                              </span><span style="color:blue">&lt;</span><span style="color:#a31515">param</span> <span style="color:red">name</span><span style="color:blue">=&quot;CommPort&quot;</span> <span style="color:red">value</span><span style="color:blue">=&quot;6&quot;</span> <span style="color:blue">/&gt;</span></span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                              </span><span style="color:blue">&lt;</span><span style="color:#a31515">param</span> <span style="color:red">name</span><span style="color:blue">=&quot;Handshaking&quot;</span> <span style="color:red">value</span><span style="color:blue">=&quot;1&quot;</span> <span style="color:blue">/&gt;</span></span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                              </span><span style="color:blue">&lt;</span><span style="color:#a31515">param</span> <span style="color:red">name</span><span style="color:blue">=&quot;BaudRate&quot;</span> <span style="color:red">value</span><span style="color:blue">=&quot;115200&quot;</span> <span style="color:blue">/&gt;</span></span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                              </span><span style="color:blue">&lt;</span><span style="color:#a31515">param</span> <span style="color:red">name</span><span style="color:blue">=&quot;RThreshold&quot;</span> <span style="color:red">value</span><span style="color:blue">=&quot;1&quot;</span> <span style="color:blue">/&gt;</span></span></p> <p class=MsoNormal><span style="font-size:10.0pt;line-height:115%;font-family:'Courier New';color:blue">&lt;/</span><span style="font-size:10.0pt;line-height:115%;font-family:'Courier New';color:#a31515">object</span><span style="font-size:10.0pt;line-height:115%;font-family:'Courier New';color:blue">&gt;</span><span></span></p> <p class=MsoNormal><span> </span></p> <p class=MsoNormal>Here is the JavaScript that sets port number for MsComm and basically starts it.</p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><strong><span style="font-size:10.0pt;font-family:'Courier New';color:blue">function</span></strong><span style="font-size:10.0pt;font-family:'Courier New'"> Listen(button) {</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span><strong><span style="color:blue">var</span></strong> port = 3 //getPortNumber();</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span><strong><span style="color:blue">if</span></strong> (isNaN(port))</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>            </span><strong><span style="color:blue">return</span></strong>;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span><strong><span style="color:blue">var</span></strong> com = $get(<span style="color:#a31515">&quot;MsComm&quot;</span>);</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span><strong><span style="color:blue">try</span></strong> {</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>            </span>com.CommPort = port;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span>} <strong><span style="color:blue">catch</span></strong> (ex) {</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>            </span>alert(<span style="color:#a31515">‘Invalid port number’</span>);</span></p> <p class=MsoNormal style="margin-top:0in;margin-right:0in;margin-bottom:.0001pt;margin-left:.5in;text-indent:.5in;line-height:normal;text-autospace:none"><strong><span style="font-size:10.0pt;font-family:'Courier New';color:blue">return</span></strong><span style="font-size:10.0pt;font-family:'Courier New'">;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span>}</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span><strong><span style="color:blue">if</span></strong> (!com) {</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>            </span>alert(<span style="color:#a31515">'MsComm control is not Installed on your computer.'</span>);</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>            </span><strong><span style="color:blue">return</span></strong>;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span>}</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span><strong><span style="color:blue">try</span></strong> {</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>            </span>com.PortOpen = <strong><span style="color:blue">true</span></strong>;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span>} <strong><span style="color:blue">catch</span></strong> (ex) {</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>            </span>alert(<span style="color:#a31515">‘Invalid port number’</span>);</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>            </span><strong><span style="color:blue">return</span></strong>;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span>}</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span>button.disabled = <strong><span style="color:blue">true</span></strong>;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>      </span>alert(<span style="color:#a31515">'Ready’</span>);</span></p> <p class=MsoNormal><span style="font-size:10.0pt;line-height:115%;font-family:'Courier New'">}<br/> <br/> Here is the javascript code that is supposed to be invoked on OnComm event of the MsComm. It had been working before but now OnComm just never fires.</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New';color:#a31515">&lt;script language=&quot;JavaScript&quot; for=&quot;MsComm&quot; event=&quot;OnComm()&quot; type=&quot;text/javascript&quot;&gt;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New';color:#a31515"><span>      </span>alert(‘Data received!’);</span></p> <p class=MsoNormal><span style="font-size:10.0pt;line-height:115%;font-family:'Courier New';color:#a31515">&lt;/script&gt;</span></p> <p class=MsoNormal><span>I wrote simple application in C# that uses MsComm and it works perfectly and invokes OnComm event Here is the code:</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                  </span><span style="color:#2b91af">MSCommClass</span> commClass = <strong><span style="color:blue">new</span></strong> <span style="color:#2b91af">MSCommClass</span>();</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                  </span><strong><span style="color:blue">try</span></strong></span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                  </span>{</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                        </span>commClass.CommPort = 3;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                        </span>commClass.RThreshold = 1;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                        </span>commClass.Handshaking = <span style="color:#2b91af">HandshakeConstants</span>.comXOnXoff;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                        </span>commClass.PortOpen = <strong><span style="color:blue">true</span></strong>;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                        </span>commClass.OnComm += <strong><span style="color:blue">new</span></strong> <span style="color:#2b91af">DMSCommEvents_OnCommEventHandler</span>(commClass_OnComm);</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                  </span>}</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                  </span><strong><span style="color:blue">catch</span></strong> (<span style="color:#2b91af">Exception</span> ex)</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                  </span>{</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                        </span><span style="color:#2b91af">Console</span>.WriteLine(ex.Message);</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                  </span>}</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                  </span><span style="color:#2b91af">Console</span>.ReadLine();</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal><span style="font-size:10.0pt;line-height:115%;font-family:'Courier New'"><span>                  </span>commClass.PortOpen = <strong><span style="color:blue">false</span></strong>;</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>            </span><strong><span style="color:blue">static</span></strong> <strong><span style="color:blue">void</span></strong> commClass_OnComm()</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>            </span>{</span></p> <p class=MsoNormal style="margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:'Courier New'"><span>                  </span></span></p> <p class=MsoNormal><span style="font-size:10.0pt;line-height:115%;font-family:'Courier New'"><span>            </span>}</span></p> <p class=MsoNormal><span>To mee it looks like I cannot invoke MsComm through javascript anymore. Even if I write </span></p> <p class=MsoNormal><span>Var obj = ActiveXObject(“MSCOMMLib.MSComm”)</span></p> <p class=MsoNormal><span><span> </span>I get following error - “Automation server can't create object”.</span></p> <p class=MsoNormal><span>I am pretty sure that MsComm is in registry though.</span></p> <p class=MsoNormal><span style="font-size:10.0pt;line-height:115%;font-family:'Courier New'"> </span></p> <p class=MsoNormal> </p> <hr class=sig> MyP3uKWed, 18 Nov 2009 17:03:32 Z2009-11-19T14:57:02Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/4acbce42-c3bd-4bf3-8829-e0fe293d2deahttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/4acbce42-c3bd-4bf3-8829-e0fe293d2deablachogihttp://social.msdn.microsoft.com/Profile/en-US/?user=blachogihandle a .net Com Class event in vb6 - the event does not sendi have the ComClassSearchCustomers class  and interface IComClassSearchCustomersat .net which used to create a tlb file. The class raise an event inside new. After that i have a vb6 form Form1 which catch the event , but it never see the event. Any ideas? <br/> <div style="background-color:white;color:black"> <pre><span style="color:blue">Option</span> Strict <span style="color:blue">On</span> <span style="color:blue">Option</span> <span style="color:blue">Explicit</span> <span style="color:blue">On</span> <span style="color:blue">Imports</span> System.Runtime.InteropServices &lt;Guid(<span style="color:#a31515">&quot;BB86EB1C-6444-424f-B83B-A667561E06C3&quot;</span>), _ ComSourceInterfaces(<span style="color:blue">GetType</span>(IComClassSearchCustomers))&gt; _ <span style="color:blue">Public</span> <span style="color:blue">Class</span> ComClassSearchCustomers <span style="color:blue">Public</span> <span style="color:blue">Delegate</span> <span style="color:blue">Sub</span> printReportEventHandler(<span style="color:blue">ByVal</span> codes <span style="color:blue">As</span> <span style="color:blue">String</span>) <span style="color:blue">Public</span> <span style="color:blue">Event</span> printReport <span style="color:blue">As</span> printReportEventHandler <span style="color:blue">Public</span> <span style="color:blue">Sub</span> <span style="color:blue">New</span>() <span style="color:blue">MyBase</span>.<span style="color:blue">New</span>() <span style="color:blue">RaiseEvent</span> printReport <span style="color:blue">End</span> <span style="color:blue">Sub</span> <span style="color:blue">End</span> <span style="color:blue">Class</span> <span style="color:blue">Imports</span> System.Runtime.InteropServices &lt;Guid(<span style="color:#a31515">&quot;D8F7EC74-0EFC-4e43-9B59-4CF741DF616D&quot;</span>), _ InterfaceType(ComInterfaceType.InterfaceIsIDispatch)&gt; _ <span style="color:blue">Public</span> <span style="color:blue">Interface</span> IComClassSearchCustomers &lt;DispId(1)&gt; _ <span style="color:blue">Sub</span> printReport(<span style="color:blue">ByVal</span> codes <span style="color:blue">As</span> <span style="color:blue">String</span>) <span style="color:blue">End</span> <span style="color:blue">Interface</span> </pre> </div> <span style="color:#0000ff;font-size:x-small"> <pre>Public WithEvents Instance As Search.ComClassSearchCustomers Private Sub Form_Load() Set Instance = New Search.ComClassSearchCustomers End Sub Private Sub Instance_printReport(ByVal codes As String) MsgBox (&quot;raise&quot;) End Sub</pre> </span>Fri, 13 Nov 2009 09:37:15 Z2009-11-18T01:37:33Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/2e529b5c-2d42-478e-abf5-90036ad678aahttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/2e529b5c-2d42-478e-abf5-90036ad678aalrschuhhttp://social.msdn.microsoft.com/Profile/en-US/?user=lrschuhOutlook Anywhere Access ProblemBackground:  Company has installed Exchange and Sharepoint on same server.<br/><br/>Needs:  I need remote access/sync from Outlook to Exchange Server for e-mail without VPN access.<br/><br/>Status: I was told Outlook Anywhere will not work.  Quote from IT Department &quot;<span class=671462116-03112009><span style="font-size:x-small;color:#0000ff;font-family:Arial">Because of the way the server was set up initially there is no way to do the remote outlook.  We put SharePoint on the same server as Exchange.  Sharepoint uses the default domain address to run.  2007 Outlook allowed for remote access using the default domain address but we are already using it.&quot;<br/><span style="color:#000000;font-family:Verdana"><br/>Interestingly, I have successfully added access to the Exchange Server on my iPhone using HTTPS.<br/><br/>Questions: This was a very simple set-up on iPhone.  Why can't I get the same functionality on my laptop?  How can I make Outook Anywhere work (server config, client config)?</span></span></span>Fri, 06 Nov 2009 07:11:55 Z2009-11-18T01:36:31Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/c1d03560-2071-472d-b5c9-720909a7600bhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/c1d03560-2071-472d-b5c9-720909a7600bGofer01http://social.msdn.microsoft.com/Profile/en-US/?user=Gofer01MSDN Subscription - (Developers Tools Area) WebSiteSpark Subscription - DVD Version<p><strong>Product Version:: Expression Studio 3 (Expression Blend 3</strong> (3.0.1927.0)<strong>)</strong><br/><br/>I have a MSDN WebSiteSparks Subscription.  In this area there is two Expression Studio 3 downloads. One is the CD version and the other download is the DVD version. The CD version doesn't require a Product Key to be entered. The DVD version requires a producy key.</p> <p>The CD version is the full version of Expression 3 with all 4 programs. The DVD version has 3 programs.  It's missing Expression Blend 3.Is this by designed?.  Expression Blend 3 is the hub between VS 2008 Pro, Expression Design 3 and Expression Encore 3.<br/><br/><strong>Work Around Solution:<br/><br/></strong>Went into the CD version setup directory and ran Blend_en.msi and BlendSDK_en.msi and then entered the DVD product key.Add Expression Blend 3 to the DVD version. Otherwise that suite will be almost useless for design tools purposes.</p> <hr class=sig> Michael SummersTue, 03 Nov 2009 21:58:39 Z2009-11-18T01:35:25Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/e37d282a-b57d-4ff5-87af-cd33df0a85cehttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/e37d282a-b57d-4ff5-87af-cd33df0a85ceelement109http://social.msdn.microsoft.com/Profile/en-US/?user=element109NetFwTypeLib and ComElevation dllhost fails to exitI am using the comelevation sample from the vistabridge library in the windows sdk to elevate a .net class I exported to a com typelib.<br/><br/>To demonstrate what I have done consider something like this:<br/><br/> <div style="background-color:white;color:black"> <pre> <span style="color:blue">class</span> Firewall:IDisposable { INetFwPolicy2 policy = (INetFwPolicy2)Activator.CreateInstance(...); <span style="color:blue">bool</span> FirewallEnabled { <span style="color:blue">get</span> { <span style="color:blue">return</span> policy.get_FirewallEnabled(profileType2); } <span style="color:blue">set</span> { policy.set_FirewallEnabled(profileType2, value); } } <span style="color:blue">void</span> EnableRule(<span style="color:blue">string</span> <span style="color:blue">group</span>, <span style="color:blue">string</span> ruleName, <span style="color:blue">bool</span> enable) { IEnumerator enumerator = <span style="color:blue">null</span>; <span style="color:blue">try</span> { enumerator = <span style="color:blue">this</span>.policy.Rules.GetEnumerator(); <span style="color:blue">while</span> (enumerator.MoveNext()) { INetFwRule iNetRule = (INetFwRule)enumerator.Current; <span style="color:blue">if</span> (<span style="color:blue">string</span>.Equals(iNetRule.Grouping, <span style="color:blue">group</span>, StringComparison.OrdinalIgnoreCase)) { <span style="color:blue">if</span> (<span style="color:blue">string</span>.Equals(iNetRule.Name, ruleName, StringComparison.OrdinalIgnoreCase)) { iNetRule.Enabled = enable; Marshal.ReleaseComObject(iNetRule); <span style="color:blue">break</span>; } } Marshal.ReleaseComObject(iNetRule); } } <span style="color:blue">finally</span> { <span style="color:blue">if</span> (enumerator <span style="color:blue">is</span> IDisposable) { (enumerator <span style="color:blue">as</span> IDisposable).Dispose(); } } } <span style="font-size:x-small"><font size=2><p> </p></font></span><p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> public</span></span><span style="font-size:x-small"> </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">void</span></span><span style="font-size:x-small"> Dispose(</span><span style="font-size:x-small">)<p> {</p><font size=2><p> </p></font></span></p><p><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small"> Marshal</span></span><span style="font-size:x-small">.ReleaseComObject(policy.Rules);<font size=2><p> </p></font></span></p><p><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small"> Marshal</span></span><span style="font-size:x-small">.ReleaseComObject(policy);<p> }</p></span></p> } </pre> </div> When I create my elevated com object and change the value of the property, all is well. When I do the same and call the function, it works but the dllhost process fails to exit. I am calling Marshal.ReleaseComObject on my elevated class. I narrowed the problem down to: Any time I iterate through the INetFwPolicy2.Rules the dllhost process fails to exit. In the above codeblock the function calls Marshal.Release... on each rule, I have tried without this call as well to no avail.<br/><br/>Any thoughts?<br/> <hr class=sig> 1000001 1100001 1110010 1101111 1101110 100000 1000001 1110011 1101000 1100101 1110010Thu, 22 Oct 2009 08:06:27 Z2009-10-27T00:01:47Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/71dfbb9f-d76d-493d-8c37-96b29c72b5f8http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/71dfbb9f-d76d-493d-8c37-96b29c72b5f8princeatapihttp://social.msdn.microsoft.com/Profile/en-US/?user=princeatapiMiscrosoft Interops Compatibility Issues Hi , Im a web developer working on asp.NET . In times i supposed to work on export from aspx page to word/excel using microsoft interops , things are good , but am facing some compatibility issues among different versions of office tools ? how to maintain a standard among different versions of Office ? can i have any code ?? generic for all versions of Microsoft Office tools ??<br /> <br /> -Prince&nbsp;Thu, 15 Oct 2009 12:32:21 Z2009-10-16T17:34:45Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/87d0d491-78ff-474b-8fc5-e227b025355chttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/87d0d491-78ff-474b-8fc5-e227b025355cgoutham Jalakamhttp://social.msdn.microsoft.com/Profile/en-US/?user=goutham%20JalakamConvert word to Jpeg or TIFF filesUsing C# can we convert Doc file into Jpeg/Tiff(Not PDF).<br/>First option is Jpeg.<br/>Please suggest some solution for this..Fri, 28 Aug 2009 10:53:19 Z2009-08-29T15:40:41Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/1846f500-badc-479a-a417-7e2a04bdbbeehttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/1846f500-badc-479a-a417-7e2a04bdbbeeVivek Batrahttp://social.msdn.microsoft.com/Profile/en-US/?user=Vivek%20BatraMerging Word Documents in ASP.Net Hello Guys<br/> <br/> I have a requirement in my project to merge multiple word documents in a one doc file. All the formatting must be retained.currently I am using words' com methods to merge the documents.But it has some formatting problems.I am looking for some third party library/dll to use in my code for merging purpose.Please help me out if you are aware of such a library/dll that works very well with all the formatting, tables and hyperlinks in the documents<br/> <br/> Thanks a lot<br/> <br/> Regards<br/> VivekWed, 26 Aug 2009 10:05:03 Z2009-08-26T16:20:36Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/092cc5a3-b42a-4ddc-a2f6-e65ce1248e6ehttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/092cc5a3-b42a-4ddc-a2f6-e65ce1248e6eshree321http://social.msdn.microsoft.com/Profile/en-US/?user=shree321Problem while splitting table cells in word 2003's XML file.<p>Hello,</p> <p>        I have created a table with 2 rows,like below in word 2003's XML file.</p> <p><span style="font-size:12pt;font-family:'Times New Roman'"> <span style="font-size:12pt;font-family:'Times New Roman'"> <table border=1 cellspacing=1 cellpadding=7 width=614> <tbody> <tr> <td colspan=2 width="25%" valign=top> <p align=left>1</p> </td> <td colspan=2 width="25%" valign=top> <p align=left>2</p> </td> <td colspan=2 width="25%" valign=top> <p align=left>3</p> </td> <td colspan=2 width="25%" valign=top> <p align=left>4</p> </td> </tr> <tr> <td width="20%" valign=top> <p align=left>5</p> </td> <td colspan=2 width="20%" valign=top> <p align=left>6</p> </td> <td colspan=2 width="20%" valign=top> <p align=left>7</p> </td> <td colspan=2 width="20%" valign=top> <p align=left>8</p> </td> <td width="20%" valign=top> <p align=left>9</p> </td> </tr> </tbody> </table> </span></span></p> <p>i wanted to split 5th cell into 4 cells programatically(DOM+java) , so have taken 5th cell's width and devided by 4, then distributed that width in 4 splitted cells, but it is disturbing other cells in the table, so how i split the cells without disturbing to the other cells in the table.Please help me regarding this.<br/><br/>Thanks<br/>Shree</p>Thu, 23 Jul 2009 06:07:50 Z2009-07-23T11:49:33Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/41b83f23-70c8-4790-b1f4-3785055be3b6http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/41b83f23-70c8-4790-b1f4-3785055be3b6AjSinghhttp://social.msdn.microsoft.com/Profile/en-US/?user=AjSinghMPP Extraction for MS 2003 project in dot net<p>I am using MS Project 2003 interop and want to dump all data from .mpp file to database.<br/>I have created database using Microsoft MS Project 2003 script provided in setup.</p> <p>Now i am getting all the values from interop object model <br/>e.g. MSProject.Project properties like ActualStart,ActualWork etc.</p> <p>I am unable to map these properties to database columns.<br/>e.g MSP_PROJECTS table has only 69 columns and <br/>MSProject.Project properties are around 274.</p> <p>moreover i am not clear if properties are giving me all the required values as per table.</p> <p>Query<br/>1.If above approach of extraction is right ?<br/>2.If yes i need mapping for same.</p> <p>Note: I dont want to use OLE DB, ODBC , mdb approaches for MPP extraction of data.</p><hr class="sig">Thanks &amp; Regards Ajay SinghFri, 10 Jul 2009 12:37:47 Z2009-07-15T19:39:01Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/8abb6be9-8dac-4af7-a3f8-1f27a771170ehttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/8abb6be9-8dac-4af7-a3f8-1f27a771170eBob Eatonhttp://social.msdn.microsoft.com/Profile/en-US/?user=Bob%20EatonPublisher PIA change of behavior for TextRange.Text between Office 2003 and 2007I have a .Net-based COM add-in that works in Publisher in which I go thru the &quot;Stories&quot; one-by-one and change the encoding of words (also, one-by-one) in-situ.<br/><br/>I iterate the Paragraphs in a Story and for each Paragraph, I use a TextRange object to isolate a single word (and it's following space) to do <br/>the replacement. So, for example, if I had a Paragraph that contained:<br/><br/>// aTextRange.Text == &quot;This is a paragraph\r&quot;;<br/><br/>Then I would make a working copy of that TextRange and set the Start = 0 (the beginning of the range) and the End = 5 (the offset of the 'i' in 'is') and this would result in:<br/><br/>// myTextRange.Text == &quot;This &quot;<br/><br/>Then I select that range (i.e. myTextRange.Select()) and then set the &quot;.Text&quot; property to my new encoding of that word (e.g. for Piglatin, <br/>&quot;myTextRange.Text = &quot;Isthay &quot;).<br/><br/>Now the problem: in Office 2003, even though my replacement text is longer, it only replaces the selected portion of the original range (resulting in the original range becoming &quot;Isthay is a paragraph\r&quot;), which is what I want.<br/><br/>But in Office 2007, it seems to ignore what portion of the TextRange is selected and replaces the length of the new string (resulting in the <br/>original range becoming &quot;Isthay paragraph&quot;--I.e. clobbering the next word(s), because the replacement string is longer than the original word).<br/><br/>Is there some way to work around this? That is, I know that I can use the _Application.Version to detect whether I'm talking to Publisher 2003 or 2007 and treat them differently, but I'm not sure how to work with the TextRange object in 2007 to make it behave like the 2003 PIA does.<br/><br/>Any ideas?<br/><br/>Thanks,<br/>Bob<br/><br/>P.S. This is only a problem with the Publisher PIAs. I do the same thing in Excel, Access, and Word (of course, with the RangeText object, instead), and it works the same in both the 2003 and 2007 versions.<br/>Fri, 10 Jul 2009 12:21:54 Z2009-07-15T19:37:15Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/4fcf196a-748b-41e2-8716-d643282827bfhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/4fcf196a-748b-41e2-8716-d643282827bfxeonclubhttp://social.msdn.microsoft.com/Profile/en-US/?user=xeonclubL2TP/IPSec with Cisco IOS CA?I am trying to create a L2TP/IPSec tunnel using a machine certificate from the Cisco IOS Certificate Authority(CA). The end points are a Windows XP machine and a Cisco IOS Router. This tunnel works perfectly fine if I use a certificate from a Microsoft CA. <br/> <br/> I was able to match all the parameters of the certificate and I also placed it in the 'local computer store' with the root certificate.<br/> <br/> Unfortunately, the connection still does not work and it fails to find a valid machine certificate. On looking at the debug logs:<br/> <br/> 6-19: 13:39:59:686:2c8 Source IP Address &lt;removed&gt;  Source IP Address Mask 255.255.255.255  Destination IP Address &lt;removed&gt;  Destination IP Address Mask 255.255.255.255  Protocol 0  Source Port 0  Destination Port 0  IKE Local Addr &lt;removed&gt;  IKE Peer Addr &lt;removed&gt;<br/>  6-19: 13:39:59:686:2c8 Certificate based Identity.    Peer Subject   Peer SHA Thumbprint 0000000000000000000000000000000000000000  Peer Issuing Certificate Authority   Root Certificate Authority   My Subject CN=cisco  My SHA Thumbprint 7aaa11d0395db589328b88d7dcad51c3f286966b  Peer IP Address: &lt;removed&gt;<br/>  6-19: 13:39:59:686:2c8 Me<br/> <strong> 6-19: 13:39:59:686:2c8 No private key associated with machine certificate</strong> <br/>  6-19: 13:39:59:686:2c8 0x80092004 0x0<br/> <br/>  <br/> On looking up the error number (0x80092004) : <br/> <br/> 0x80092004 (-2146885628) -- 2148081668 (-2146885628)<br/> Error message text: Cannot find object or property.<br/> <br/> This happens even though windows claims that it has the private key associated with that particular certificate.<br/> <br/> Any ideas on how to solve this? <br/> <br/> Thanks!<br/>Mon, 06 Jul 2009 23:24:26 Z2009-07-08T21:59:27Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/18b9ef70-a4c9-42b3-8161-0620bdd16f36http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/18b9ef70-a4c9-42b3-8161-0620bdd16f36manjunathatvhttp://social.msdn.microsoft.com/Profile/en-US/?user=manjunathatvMicrosoft Word 12.0 Object Library throws oDoc.SaveAs() "The message filter indicated that the application is busy."<p>In our web application VS 2008, When I try to convert an Office 2003 file to Office 2007 file format, am getting the following exception In the oDoc.SaveAs() statement. What might be the reason! we are using Microsoft Word 12.0 Object Library and Microsoft Excel 12.0 Object Library.<br/><strong>The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))</strong></p> <p>Have the following code :-<br/> public static string ConvertDocToDocx(object sourceDocFilePath, object destinationDocxFilePath)<br/>        {<br/>            object omissing = System.Reflection.Missing.Value;<br/>            Word._Application oWord = GetWordApplicationInstance();<br/>            Word._Document oDoc;<br/>            oDoc = oWord.Documents.Open(ref sourceDocFilePath, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing);<br/>            object frmt = Word.WdSaveFormat.wdFormatXMLDocument;//Foramt meant for Office 2003.<br/>            oDoc.SaveAs(ref destinationDocxFilePath, ref frmt, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing, ref omissing);<br/>            oDoc.Close(ref omissing, ref omissing, ref omissing);<br/>            return (string)destinationDocxFilePath;<br/>        }</p> <p>private static Word.Application GetWordApplicationInstance()<br/>        {<br/>            Word.Application oWord = null;<br/>            try<br/>            {<br/>                oWord = (Microsoft.Office.Interop.Word.Application)System.Runtime.InteropServices.Marshal.GetActiveObject(&quot;Word.Application&quot;);<br/>            }<br/>            catch (Exception)<br/>            {<br/>                oWord = null;<br/>            }<br/>            if (oWord == null)<br/>            {<br/>                oWord = new Word.Application();<br/>                oWord.Visible = false;<br/>            }<br/>            return oWord;<br/>        }<br/><br/><br/>Thanks,<br/>Manjunath.</p><hr class="sig">manjunathWed, 01 Jul 2009 13:44:10 Z2009-07-01T16:31:34Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/4cbbd187-09a3-456c-93ff-7d7b05001c7dhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/4cbbd187-09a3-456c-93ff-7d7b05001c7dJiLuhttp://social.msdn.microsoft.com/Profile/en-US/?user=JiLuAccessing windows 2003 folder through unix serverHi,<br/><br/>While accessing the windows folder through unix server, I'm getting username or password failed error. I used to access the same yesteday but today it started giving error.<br/><br/>I have checked following<br/>1. Remote Shell Service is running<br/>2. .rhosts file contents remote host and id correctly<br/><br/>One strange this I found in event viewer security audit log. The user id through wich unix used to connect earlier to windows, is deleted from windows local users. So I have created local users &amp; password same as available in unix server. I have restarted the remote shell service, but still the problem exists.<br/><br/>Thanks,<br/><hr class="sig">- JLTue, 30 Jun 2009 07:38:22 Z2009-06-30T19:07:43Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/1062839b-b0b9-4b35-ab78-4fecc9fefa9bhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/1062839b-b0b9-4b35-ab78-4fecc9fefa9bMM2410http://social.msdn.microsoft.com/Profile/en-US/?user=MM2410Creating PowerPoint files via C# and COM InteropHi there, <div><br/></div> <div>this is very urgent and I really don't know, what I can do more. I want to build a PowerPoint file using ASP.NET and #C. That works fine with this COM Library, but I'm not able to fill a textbox with a specific color. The only way I found in the web is this one:</div> <div><br/></div> <div> <pre lang="x-c#">private void ppt_addPhaseName(PowerPoint.Slide slide, String name) { PowerPoint.Shape shape = slide.Shapes.AddTextbox(Microsoft.Office.Core.MsoTextOrientation.msoTextOrientationVerticalFarEast, 0f, 0f, 32.0f, 65.0f); shape.Fill.ForeColor.RGB = System.Drawing.Color.Black.ToArgb(); shape.TextFrame.TextRange.Text = name; shape.TextFrame.TextRange.Font.Color.RGB = System.Drawing.Color.White.ToArgb(); shape.TextFrame.TextRange.Font.Size = 13; }</pre> </div> <div>Everything works fine, the font color too. But the filling of the textbox doesn't work. I always get that Exception:</div> <div><br/></div> <div> <pre>System.ArgumentException: Der Wert liegt außerhalb des erwarteten Bereichs.</pre> Which means in English something like: &quot;The value is out of the expected range&quot;...</div> <div><br/></div> <div>Can you help me?</div> <div>Thanks!</div>Wed, 24 Jun 2009 16:05:45 Z2009-06-25T14:50:47Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/c89b15b9-909a-4775-b1fc-d4c388b7a3abhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/c89b15b9-909a-4775-b1fc-d4c388b7a3abCandi7http://social.msdn.microsoft.com/Profile/en-US/?user=Candi7xml mapping in excelHello<br/><br/>I'm trying to map XML data in Excel and I have followed the instructions listed on the following web-blog <a href="http://blogs.msdn.com/brian_jones/archive/2005/08/25/456298.aspx">http://blogs.msdn.com/brian_jones/archive/2005/08/25/456298.aspx</a> however it is not working for me, when i try to save or export it tells me that my map is not exportable...<br/><br/>this is the file that I am attempting to use as my 'map' and it must be exported in the format in order for me to use import it successfully into a database program that I am using...<br/><br/>&lt;import type=&quot;financials&quot; mode=&quot;Insert&quot; startdate=&quot;2008-01-01&quot; enddate=&quot;2010-01-01&quot; importbudget=&quot;1&quot; importexpenditures=&quot;1&quot; importfundingsources=&quot;1&quot; isfiscalmonth=&quot;0&quot; searchmode=&quot;1&quot;&gt;<br/>&lt;project name=&quot;TEST2&quot; number=&quot;2&quot;&gt;<br/>&lt;budgets&gt;<br/>&lt;budgetcategory name=&quot;Other&quot; type=&quot;&quot; gl=&quot;&quot; abbrev=&quot;&quot;&gt;<br/>&lt;byear year=&quot;2009&quot; amount=&quot;10.00&quot;&gt;<br/>&lt;/byear&gt;<br/>&lt;/budgetcategory&gt;<br/>&lt;/budgets&gt;<br/>&lt;expenditures&gt;<br/>&lt;/expenditures&gt;<br/>&lt;fundingsources&gt;<br/>&lt;fundingsource name=&quot;FRP&quot;&gt;<br/>&lt;fyear year=&quot;2009&quot; amount=&quot;1000.00&quot;/&gt;<br/>&lt;fyear year=&quot;2010&quot; amount=&quot;10000.00&quot;/&gt;<br/>&lt;/fundingsource&gt;<br/>&lt;/fundingsources&gt;<br/>&lt;/project&gt;<br/>&lt;/import&gt;<br/><br/>Can anyone tell me why this isn't working?<br/><br/>Thanks!!Mon, 15 Jun 2009 13:57:40 Z2009-06-15T16:11:09Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/2282f188-fce2-4f3f-9509-69a72bc32481http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/2282f188-fce2-4f3f-9509-69a72bc32481Xaochttp://social.msdn.microsoft.com/Profile/en-US/?user=XaocDelete this thread, wrong forum// edit - removed<br/> <br/> Wrong forum.<br/> <hr class=sig> In fiery flight we would leave this hall...Thu, 04 Jun 2009 08:16:59 Z2009-06-05T08:54:11Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/f85d089a-2017-498b-9841-e21240745408http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/f85d089a-2017-498b-9841-e21240745408Prashantrhttp://social.msdn.microsoft.com/Profile/en-US/?user=PrashantrHow to create generic tool/product/mapping that will resolve the below issue?<p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'">Hi guys,</span></p> <p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'">Currently, I am working with one client they have following scenario to manipulation with data files and DB</span></p> <p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'">1) Unknown data file format to DB<br/>         1.1) Used to get different type of for data file from different client through FTP location<br/>         1.2) Parse this file and dump the data into consolidated DB structure (known)<br/>               -- what ever data are fit into normalized data base<br/>         1.3) want error log and email alerts for each completed/fail transactions.</span></p> <p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'"> My thoughts:<br/>       1) Provide UI interface to store the new client info and their input data file format structure<br/>          Into different database table<br/>      2) Load the file data based on format in above step(1) in temporary table<br/>            2.1) SSIS packages? <br/>            2.2) BCP and Stored procedure? <br/>            2.3) Powershell script<br/>            2.4) C# program   <br/>  3) read this tables and dump the data into database<br/>           2.1) SSIS packages?<br/>           2.2) BCP and Stored procedure?<br/>           2.3) Powershell script<br/>           2.4) C# program</span></p> <p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'"> <strong><span style="font-family:'Verdana','sans-serif'">Important</span></strong> ## Here I am assuming my destination <strong><span style="font-family:'Verdana','sans-serif'">DB table structure is static</span></strong>, BUT in future it will<br/>     Change, can i have some kind of mapping that will fit with <strong><span style="font-family:'Verdana','sans-serif'">dynamic</span></strong> unknown file format will map with <strong><span style="font-family:'Verdana','sans-serif'">dynamic</span></strong> database tables</span></p> <p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'">2) DB to unknown data file format<br/>          2.1) From the DB data create different structured file, based on Client requirement<br/>          2.2) put into their FTP location</span></p> <p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'">  My thoughts:<br/>           1) Provide UI interface to store the new client info and their output data file format structure<br/>               into different database table<br/>           2) From the database data create different structured files<br/>                  2.1) SSIS packages ? <br/>                  2.3) Powershell script<br/>                  2.4) C# program<br/>   <br/> <strong><span style="font-family:'Verdana','sans-serif'">Important</span></strong> ## Here I am assuming my source <strong><span style="font-family:'Verdana','sans-serif'">DB structure is static</span></strong>, BUT in future it will<br/>                        change, can i have some kind of mapping that will fit with <strong><span style="font-family:'Verdana','sans-serif'">dynamic source database table</span></strong> map with <strong><span style="font-family:'Verdana','sans-serif'">dynamic structured output</span></strong> files</span></p> <p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'">Appreciate your suggestions and help.</span></p> <p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'">thanks,<br/>Prashant</span></p><hr class="sig">pbrathodWed, 20 May 2009 15:27:59 Z2009-06-04T03:56:16Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/0d65f48d-5e75-45e3-b4e9-e120ce9bc60dhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/0d65f48d-5e75-45e3-b4e9-e120ce9bc60dPrashantrhttp://social.msdn.microsoft.com/Profile/en-US/?user=PrashantrHow to automate -- routine manual steps to load the data file in UNIX environment?<p>Hi guys,</p> <p>Currently I am working on one project that has following issue, I want to automate this problem</p> <p>1) We used to send a flat file data into some FTP location. <br/>2) Once we moved our flat data file to client's FTP location <br/>3) We have to manually log-in to their system and we have to provide uploaded file name (<strong>predefine file name with current date</strong>) <br/>    Under the import file section of their system.<br/>        3.1) they provide us one executable for remote terminal login<br/>        3.2) one we run this .exe it will ask user name and password, once we supply this information<br/>        3.3) it will display the screen like mainframe screen<br/>                  1) Production<br/>                  2) Test<br/>                  3) Demo<br/>                  4) Logout<br/>  <br/>               enter your option.___<br/>        <br/>       3.4) next it will show menu like…<br/>               1) View data<br/>              2) Maintenance<br/>              3) Reporting <br/>              4) Sign off<br/>              Enter your option____<br/> <br/> Similarly we have to follow couple of predefine steps and finally we will provide our <strong>file name that we want to import</strong> into their database</p> <p>4) Once we provide file name it will automatically import the file data into their system.</p> <p>I wanted to automate step 3 and all sub steps (3.1,3.2...)<br/>They have Unix terminal where I used to logged in. Can I write some script to automate this step?</p> <p>Highly appreciate your suggestions.</p> <p>thanks,<br/>prashant</p><hr class="sig">pbrathodWed, 20 May 2009 14:27:59 Z2009-06-04T03:55:01Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/96b69c1f-2b11-4f91-aff4-9641adf88989http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/96b69c1f-2b11-4f91-aff4-9641adf889895555collierhttp://social.msdn.microsoft.com/Profile/en-US/?user=5555collierAccessing com ports greater than 9 in TCL on Windows XPI'm using a TCL script (on Windows XP) to access com ports which selects a port from a serial server. When I access try to access COM10, it doesn't work. <br/><br/>set serialDevice [open COMx r+] <br/><br/> will open the com ports through 9 but will not work for 2 digit com ports. According to the all documentation I have read,<br/><br/>set serialDevice [open &quot;//./COM10&quot; r+]  <br/><br/>should work as an alternate method and for 2 digit com ports. This does not work for any com ports. Any help?<br/><br/>Mon, 18 May 2009 19:44:23 Z2009-06-04T03:52:47Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/a5a0cc1b-e017-4f09-b055-fec4848c6e47http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/a5a0cc1b-e017-4f09-b055-fec4848c6e47Chris__2000http://social.msdn.microsoft.com/Profile/en-US/?user=Chris__2000Register COM-classesHi,  I'm building com-libraries with VB-forms to extend a application. I notice a difference between classes written in VB.Net and C#.<br/><br/>In VB.Net there is the COM-class template. I use this, I build it, register the COM-guid in the application and it's working.<br/><br/>For C# I need to do a few more steps. Besides the fact there is no COM-class template and you need to write your own, after building the project and registering the GUID, the COM-class cannot be found. After putting the COM-class in the GAC and running the tool RegAsm.exe-tool the C# COM-class can be found. <br/><br/>Why the difference?<br/><br/>Thanks in advance for any responses.<br/><br/>Regards,<br/><br/>ChrisFri, 15 May 2009 07:31:53 Z2009-05-15T17:34:59Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/3f47114b-3b2b-48bf-8a79-89cc14f31805http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/3f47114b-3b2b-48bf-8a79-89cc14f31805Zuhair Albazihttp://social.msdn.microsoft.com/Profile/en-US/?user=Zuhair%20AlbaziProblem in paragraph justification in Word 2007.In Word 2007, In Arabic Language whenever I apply low, medium or high justification the Kashidah i.e. the stretching line within the words appear at wrong places as shown by the red arrows in the picture below. This problem appears in all those arabic fonts containing large number of glyphs i.e Microsoft Arabic TypeSetting Font, Adobe Arabic Font etc. what would be the solution ? To observe the images of problem please take a look at this page http://www.typophile.com/node/56836Sat, 11 Apr 2009 19:40:47 Z2009-04-20T14:39:40Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/7224a20d-0d14-4fea-bbd2-9115d0a8eba9http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/7224a20d-0d14-4fea-bbd2-9115d0a8eba9jeffurban23http://social.msdn.microsoft.com/Profile/en-US/?user=jeffurban23Bios Update, Ram Upgrade, General Operating & heat questions.I have a HP Pavillion DV9009nr.  Specs below:<br/> <br/> Mobile DualCore AMD Turion 64 X2 TL-52, 1600 MHz (8 x 200)<br/> nVidia GeForce Go 6150, AMD Hammer<br/> 2 slots of ram with 1G in each.  <br/> I'm running Vista 32 Bit<br/> BIOS Type - Phoenix (12/18/06)<br/> Video Adapter NVIDIA GeForce GO 6150 (64 MB)<br/> Bios version F.25<br/> Mobo Props - Quanta 30B9 65.26<br/> Processor<br/> Now running at 67 Degrees, was over 90 degrees last night (celsius)<br/> Run second monitor, and run some heavier programs (ACT, QuickBooks, Outlook, etc.) all at the same time.<br/> <br/> My Questions:<br/> <br/> Been researching how to upgrade the ramt o 4G, and everyone at HP is telling me you can't do it.  But does not seem legitimate.  I found some people that have said through forums that when I upgrade the Bios, I should be able to at least get 3G of Ram.  <br/> <br/> Here is a link to a forum I found on exactly this.  This guy's computer is almost identical to mine.  Only difference is out Bios.  His is F.3D.  Mine is F.25, and the current version is F.42.  However, if you go to the HP website, it tells many users not to run the F.3D Bios. (but my PN does not match the one they talk about)<br/> <br/> http://forum.notebookreview.com/showthread.php?t=347808<br/> <br/> I have orderd the exact RAM he has and got it pretty cheap. (4G (2x2) for $30)<br/> <br/> Questions.<br/> <br/> <span style="text-decoration:underline"><em><strong>1)  Should I update the BIOS?</strong> </em> </span> <br/> <br/> If I should, how to do easily back up my BIOS in case something goes wrong, and if something does go wrong, what are my next steps. <br/> I would also have to do much research into how to update the BIOS.   I've never done it before and am a touch nervous to do it.<br/> <span style="text-decoration:underline"><em><strong><br/> 2)  If I do update my BIOS, what version?  Should I update to the F.3D or the F.42?<br/> <br/> 3)  My bandwith is running very low.  Any typical programs I should shut down to increase it?<br/> <br/> 4)  My computer is running hot...very hot.  Will the BIOS upgrade help this?<br/> <br/> 5) Very random question...  I have my secondary monitor running into the docking port of the computer/  Because of that the secondary monitor output is free.  Shouldn't I be able to put another monitor into that slot, and be able to use a third???<br/> </strong> </em> </span> <br/> Any help anyone can provide would be great.<br/>Thu, 09 Apr 2009 21:15:41 Z2009-04-17T19:12:50Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/14553eeb-02ab-43c9-875e-bbc4ff7cbca9http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/14553eeb-02ab-43c9-875e-bbc4ff7cbca9awesomerawhttp://social.msdn.microsoft.com/Profile/en-US/?user=awesomerawExtracting historical data from LiveStats.XSP 7Hi there.<br/><br/>I've inherited a LiveStats.XSP installation from a predecessor, which houses web stats for over 400 web-sites.  I would like to extract his data from livestats and convert it into a format which can be processed by our in-house stats package...  So far I've had very little luck in deciphering the database schema, or the data files stored in the livestats installation directory - I've wasted well over a day trying to make sense of it all.<br/><br/>The data points I'm primarily interested in are daily bandwidth usage, and the daily number of hits per site.  Can anyone shed any light onto the process I might undergo in order to perform this conversion?  I'm not to keen on the prospect of having to manually login to livestats for every site, and download a couple XML/CSV files for each - that, IMO, is just to tedious a task for anyone to have to perform... unless they were being punished for something :P<br/><br/>Any ideas, or ready made scripts out there that can save the day for me?<br/><br/>Thanks in advance!<br/>Tue, 07 Apr 2009 07:21:00 Z2009-07-29T01:01:45Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/a1507071-b034-4b04-88b0-717f6afee948http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/a1507071-b034-4b04-88b0-717f6afee948frankmeng123http://social.msdn.microsoft.com/Profile/en-US/?user=frankmeng123how to restrict the returned fields in Winrm<div></div> <div> <p class=MsoNormal><span style="font-family:'Arial','sans-serif';font-size:10pt">When I do query to Windows table, say:<span style="color:#2a00ff">SELECT Availability FROM Win32_Processor, </span> <span style="color:black">I am expecting only return the Availability field; However, Winrm returns me the whole node of Win32_Processor. So it seems I had sent : select * from Win32_Processor.</span> </span></p> </div> <div> <p class=MsoNormal> </p> </div><hr class="sig">frankmTue, 31 Mar 2009 17:46:45 Z2009-04-03T16:19:45Zhttp://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/35c76bcf-56e0-4d04-8585-2f14b5c33707http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/35c76bcf-56e0-4d04-8585-2f14b5c33707ShellPlayerhttp://social.msdn.microsoft.com/Profile/en-US/?user=ShellPlayerMy first PShell Script is broken!<p>I am wanting to control the color output to the line numbers in PShell Console, for ease of reading long lines of data: this is my first attempt @ Script writing any help would greatly be used to continue with this long awaitted Shell for Windows. thanks an old, new Shellplayer.</p> <p>$0 = linenumber {if ($0 = 0,2,4,6,..,foreach $0 % 100) {&quot;$0 is Even&quot;}}<br>$1 = linenumber {if ($1 = 1,3,5,7,..,foreach $1 % 99) {&quot;$1 is Odd&quot; }}<br>While (linenumber Even is &quot;magna&quot; Color)<br>While (linenumber Odd is &quot;yellow&quot; Color)<br>WriteHost = ConsoleOutPut = $0 + $1<br><br>running winVista Basic.<br></p>Thu, 26 Mar 2009 01:33:39 Z2009-03-28T02:01:56Z