<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Programmatically Access Word 2007 Document From DIP</title><link>https://www.infopathdev.com:443/forums/thread/50294.aspx</link><pubDate>Mon, 04 Jan 2010 17:49:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50294</guid><dc:creator>eddyblanco</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50294.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50294</wfw:commentRss><description>&lt;p&gt;If you have the values of the content type as mention. Below is just an example to guide you. there are other way to do the same.&lt;/p&gt;
&lt;p&gt;Use the web service for the list&lt;/p&gt;
&lt;p&gt;//get the name of the file &lt;/p&gt;
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNormal"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator xnDoc = this.MainDataSource.CreateNavigator();&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNormal"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Create a Navigator object for the field that you want to set.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator TitleDescription = xnDoc.SelectSingleNode(”/my:TitleDescription”, this.NamespaceManager);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;//so now I assume you will have the name of the file or what you are queryn for.&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPSListWeb.Lists listService = new SPSListWeb.Lists();&lt;/font&gt;&lt;font face="Times New Roman"&gt; 
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNormal"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Authenticate the current user by passing their default&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; credentials to the Web service from the system credential cache.*/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; listService.Credentials = System.Net.CredentialCache.DefaultCredentials;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; listService.PreAuthenticate = true;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNormal"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Set the Url property of the service for the path to a subsite.*/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; listService.Url = “&lt;a href="http://xxxxxx/_vti_bin/lists.asmx"&gt;&lt;font color="#004477"&gt;http://xxxxxx/_vti_bin/lists.asmx&lt;/font&gt;&lt;/a&gt;“;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; listService.PreAuthenticate = true;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNormal"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Get Name attribute values (GUIDs) for list and view. */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Xml.XmlNode ndListView = listService.GetListAndView(”thelistname”, “”);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string strListID = ndListView.ChildNodes[0].Attributes[&amp;quot;Name&amp;quot;].Value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string strViewID = ndListView.ChildNodes[1].Attributes[&amp;quot;Name&amp;quot;].Value;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNormal"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Create an XmlDocument object and construct a Batch element and its attributes. Note that an empty ViewName parameter causes the method to use the default view. */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Xml.XmlDocument doc = new System.Xml.XmlDocument();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Xml.XmlElement batchElement = doc.CreateElement(”Batch”);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; batchElement.SetAttribute(”OnError”, “Continue”);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; batchElement.SetAttribute(”ListVersion”, “1″);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; batchElement.SetAttribute(”ViewName”, strViewID);&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNormal"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XmlDocument documentQuery = new XmlDocument();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XmlElement query = documentQuery.CreateElement(”Query”);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Xml.XmlElement viewFields = documentQuery.CreateElement(”ViewFields”);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // The CAML query to return what I’m looking for.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.InnerXml = ” &amp;lt;Where&amp;gt;” +&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “&amp;lt;Eq&amp;gt;” +&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “&amp;lt;FieldRef Name=\”Title\” /&amp;gt;” +&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “&amp;lt;Value Type=\”Text\”&amp;gt;” + TitleDescription + “&amp;lt;/Value&amp;gt;” +&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “&amp;lt;/Eq&amp;gt;” +&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “&amp;lt;/Where&amp;gt;”;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNormal"&gt;//now just get the name of the field you need. this is just an example to guide you&lt;br /&gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Programmatically Access Word 2007 Document From DIP</title><link>https://www.infopathdev.com:443/forums/thread/50291.aspx</link><pubDate>Mon, 04 Jan 2010 16:14:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50291</guid><dc:creator>eddyblanco</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50291.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50291</wfw:commentRss><description>&lt;p&gt;Which list or forms library list is the content type asscoaited to?&lt;/p&gt;</description></item><item><title>Re: Programmatically Access Word 2007 Document From DIP</title><link>https://www.infopathdev.com:443/forums/thread/50290.aspx</link><pubDate>Mon, 04 Jan 2010 15:55:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50290</guid><dc:creator>SuperX78</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50290.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50290</wfw:commentRss><description>In my case, yes the values that I care about are in the content type.</description></item><item><title>Re: Programmatically Access Word 2007 Document From DIP</title><link>https://www.infopathdev.com:443/forums/thread/50277.aspx</link><pubDate>Sun, 03 Jan 2010 14:31:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50277</guid><dc:creator>eddyblanco</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50277.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50277</wfw:commentRss><description>&lt;p&gt;Hello Riki,&lt;/p&gt;
&lt;p&gt;Actually this is to deternmine if you see the values you are looking for on the content type.&lt;/p&gt;
&lt;p&gt;1) Open the Infopath form as usual with the Word 2007 content. 2) On the server running MOSS open &amp;quot;Sharepoint Manager 2007&amp;quot; 3) GO to the site collection hosting the Infopath form, and take a look at the content type value&amp;#39;s&lt;/p&gt;
&lt;p&gt;Let me know if you see the content you are looking for.&lt;/p&gt;</description></item><item><title>Re: Programmatically Access Word 2007 Document From DIP</title><link>https://www.infopathdev.com:443/forums/thread/50276.aspx</link><pubDate>Sun, 03 Jan 2010 13:54:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50276</guid><dc:creator>rikigo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50276.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50276</wfw:commentRss><description>&lt;p&gt;Thank you&amp;nbsp;for your help and the quick answer !&lt;/p&gt;
&lt;p&gt;I download the project like you suggest .&lt;/p&gt;
&lt;p&gt;since its a big project can you please direct me to the class or object&amp;nbsp;I need to add to my code in order to access Word 2007 Document from DIP&amp;nbsp;.&lt;/p&gt;
&lt;p&gt;thanks riki.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Programmatically Access Word 2007 Document From DIP</title><link>https://www.infopathdev.com:443/forums/thread/50275.aspx</link><pubDate>Sun, 03 Jan 2010 12:41:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50275</guid><dc:creator>eddyblanco</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50275.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50275</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m not sure of the answer, but what I would do is. Download &lt;a href="http://spm.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=22762"&gt;http://spm.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=22762&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and see if the content type has the values you are looking for, if it does I could send you some code.&lt;/p&gt;
&lt;p&gt;Hope that helps&lt;/p&gt;</description></item><item><title>Re: Programmatically Access Word 2007 Document From DIP</title><link>https://www.infopathdev.com:443/forums/thread/50274.aspx</link><pubDate>Sun, 03 Jan 2010 12:26:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50274</guid><dc:creator>rikigo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50274.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50274</wfw:commentRss><description>&lt;p&gt;I also have this question..&lt;/p&gt;
&lt;p&gt;can anyone&amp;nbsp; help me please?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;riki.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Programmatically Access Word 2007 Document From DIP</title><link>https://www.infopathdev.com:443/forums/thread/50181.aspx</link><pubDate>Mon, 28 Dec 2009 01:36:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50181</guid><dc:creator>SuperX78</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50181.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50181</wfw:commentRss><description>I have a custom document information panel in InfoPath 2007 that is based on a SharePoint content type.  Is it possible to access the Word document from managed code in the DIP?</description></item></channel></rss>