<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/41028.aspx</link><pubDate>Mon, 27 Apr 2009 22:41:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41028</guid><dc:creator>msupinski</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41028.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=41028</wfw:commentRss><description>&lt;p&gt;I am trying to use InfoPath 2007 in compatibility mode for 2003.&amp;nbsp; I want to code on switching view to copy data in field on form to clipboard.&amp;nbsp; I have tried&amp;nbsp;various ways but keep getting errors.&amp;nbsp; I feel I am so close and hate to bother you.&amp;nbsp; What would be the code to use Visual basic InfoPath 2003?&amp;nbsp; Thanks for your help.&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/38860.aspx</link><pubDate>Tue, 24 Feb 2009 20:29:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38860</guid><dc:creator>wil7575_newUser</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38860.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38860</wfw:commentRss><description>&lt;p&gt;Many Thanks, Correct programming language in of course made a big difference.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Works great now.&lt;/p&gt;&lt;p&gt;Now when I open a new form I want the info in the clipboard to paste, but the following command does not work:&lt;/p&gt;&lt;p&gt;CurrentView.ExecuteAction(ActionType.Paste, &amp;quot;/dfs:myFields/dfs:dataFields/d:Device/@DevName&amp;quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/38824.aspx</link><pubDate>Tue, 24 Feb 2009 03:55:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38824</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38824.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38824</wfw:commentRss><description>&lt;p&gt;That&amp;#39;s because it&amp;#39;s VBScript code but you&amp;#39;re using Visual Basic.&amp;nbsp; With Visual Basic in InfoPath 2007 you can do this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; nodeToCopy &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; XPathNavigator = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/d:PatchRequest/@DevName&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Not&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.IsNullOrEmpty(nodeToCopy.Value) &lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;Clipboard.SetText(nodeToCopy.Value, TextDataFormat.Text)&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Else&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;MessageBox.Show(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;There is no text to copy!&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That is assuming the field you&amp;#39;re referencing is in the main data source.&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/38803.aspx</link><pubDate>Mon, 23 Feb 2009 18:38:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38803</guid><dc:creator>wil7575_newUser</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38803.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38803</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I put the code &amp;#39;as is&amp;#39; after changed event of list box&lt;/p&gt;&lt;p&gt;Error I&amp;#39;m getting is &amp;#39;xdocument&amp;#39; is not declared.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Namespace NetworkRequestForm2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Class FormCode&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim fieldValue As String = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:PatchRequest/@DevName&amp;quot;, NamespaceManager).Value&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; Member variables are not supported in browser-enabled forms.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; Instead, write and read these values from the FormState&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; dictionary using code such as the following:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; Private Property _memberVariable() As Object&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _memberVariable = FormState(&amp;quot;_memberVariable&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FormState(&amp;quot;_memberVariable&amp;quot;) = value&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Set&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; End Property&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; NOTE: The following procedure is required by Microsoft Office InfoPath.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; It can be modified using Microsoft Office InfoPath.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub InternalStartup(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Startup&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; AddHandler EventManager.XmlEvents(&amp;quot;/dfs:myFields/dfs:dataFields/d:PatchRequest/@New_&amp;quot;).Changing, AddressOf PatchRequest_New__attr_Changing&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; AddHandler EventManager.XmlEvents(&amp;quot;/dfs:myFields/dfs:dataFields/d:PatchRequest/@New_&amp;quot;).Validating, AddressOf PatchRequest_New__attr_Validating&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; AddHandler EventManager.XmlEvents(&amp;quot;/dfs:myFields/dfs:dataFields/d:PatchRequest/@New_&amp;quot;).Changed, AddressOf PatchRequest_New__attr_Changed&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub PatchRequest_New__attr_Changing(ByVal sender As Object, ByVal e As XmlChangingEventArgs)&lt;br /&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;#39; Ensure that the constraint you are enforcing is compatible&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;#39; with the default value you set for this XML node.&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; Dim fieldValue As String = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:PatchRequest/@DevName&amp;quot;, NamespaceManager).Value&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Protected Overrides Sub Finalize()&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; MyBase.Finalize()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub PatchRequest_New__attr_Validating(ByVal sender As Object, ByVal e As XmlValidatingEventArgs)&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;#39; Write your code here.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub PatchRequest_New__attr_Changed(ByVal sender As Object, ByVal e As XmlEventArgs)&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; Dim objXMLNode&lt;br /&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; objXMLNode = &lt;span style="font-weight:bold;"&gt;XDocument.DOM.selectSingleNode(&amp;quot;&lt;/span&gt;/dfs:myFields/dfs:dataFields/d:PatchRequest/@DevName&lt;span style="font-weight:bold;"&gt;&amp;quot;)&lt;/span&gt;&lt;br style="font-weight:bold;" /&gt;&lt;span style="font-weight:bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.View.SelectText(objXMLNode)&lt;/span&gt;&lt;br style="font-weight:bold;" /&gt;&lt;span style="font-weight:bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.View.ExecuteAction(&amp;quot;Copy&amp;quot;)&lt;/span&gt;&lt;br style="font-weight:bold;" /&gt;&lt;span style="font-weight:bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; Write your code here to change the main data source.&lt;/span&gt;&lt;br style="font-weight:bold;" /&gt;&lt;span style="font-weight:bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Class&lt;br /&gt;End Namespace&lt;br /&gt;.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/38741.aspx</link><pubDate>Sat, 21 Feb 2009 01:18:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38741</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38741.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38741</wfw:commentRss><description>&lt;p&gt;It does work in InfoPath 2007.&amp;nbsp; Could you show us the code you&amp;#39;re trying to use and the error you&amp;#39;re getting?&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/38740.aspx</link><pubDate>Fri, 20 Feb 2009 23:08:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38740</guid><dc:creator>wil7575_newUser</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38740.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38740</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;This does not appear to work in infopath 2007, any idea on where I can start?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/34978.aspx</link><pubDate>Thu, 27 Nov 2008 10:07:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34978</guid><dc:creator>Joerg Knoerchen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34978.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34978</wfw:commentRss><description>&lt;p&gt;Hi Jimmy,&lt;/p&gt;
&lt;p&gt;this is my code now and it works very fine now...&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;br /&gt;Sub CopySmartKey_OnClick()&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; Dim objXMLNode&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; set objXMLNode = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:SmartKeyValue&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp; XDocument.View.SelectText(objXMLNode)&lt;br /&gt;&amp;nbsp;&amp;nbsp; XDocument.View.ExecuteAction(&amp;quot;Copy&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;End Sub&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Now thanks again for all your help...&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Joerg&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/34974.aspx</link><pubDate>Thu, 27 Nov 2008 09:40:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34974</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34974.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34974</wfw:commentRss><description>&lt;p&gt;Please try changing line 25 to&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; XDocument.View.Select&lt;strong&gt;Text&lt;/strong&gt;(objXMLNode)&lt;/p&gt;
&lt;p&gt;that should do the trick.&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/34972.aspx</link><pubDate>Thu, 27 Nov 2008 08:47:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34972</guid><dc:creator>Joerg Knoerchen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34972.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34972</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Jimmy:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;In all likelihood the error you&amp;#39;re getting&amp;nbsp;is the result of invalid XPath in line 24.&amp;nbsp; In an earlier post you had a node name my:SmartKey, and in this post you have my:SmartKeyValue.&amp;nbsp; Which one is it?&amp;nbsp; And in either case, unless you changed it from the default, the &amp;#39;F&amp;#39; in my:myFields should be capitalized.&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Hi Jimmy,&lt;/p&gt;
&lt;p&gt;many thanks for your hint!&lt;/p&gt;
&lt;p&gt;Well I produced a new form to have a new environment to test with and I called the Field SmartKeyValue in this form so this is OK, but I had a lowered F and capitalized it, it seems now that I&amp;#39;m closer to my desired outcome as I do now have this error:&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;br /&gt;The following error occurred:&lt;/p&gt;
&lt;p&gt;Either the combination of values for the View.SelectNodes call is an invalid selection, or the values are not defined for this view, defined for this view more than once, or not selectable in the view.&lt;br /&gt;File:script.vbs&lt;br /&gt;Line:25&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Line:25 looks like this: XDocument.View.SelectNodes(objXMLNode)&lt;/p&gt;
&lt;p&gt;Many thanks for helping me and your patience!&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Joerg&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/34970.aspx</link><pubDate>Thu, 27 Nov 2008 08:18:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34970</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34970.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34970</wfw:commentRss><description>&lt;p&gt;In all likelihood the error you&amp;#39;re getting&amp;nbsp;is the result of invalid XPath in line 24.&amp;nbsp; In an earlier post you had a node name my:SmartKey, and in this post you have my:SmartKeyValue.&amp;nbsp; Which one is it?&amp;nbsp; And in either case, unless you changed it from the default, the &amp;#39;F&amp;#39; in my:myFields should be capitalized.&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/34969.aspx</link><pubDate>Thu, 27 Nov 2008 08:00:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34969</guid><dc:creator>Joerg Knoerchen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34969.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34969</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Hilary Stoupa:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;I&amp;#39;d guess the &amp;quot;//&amp;quot; before my:myfields should be &amp;quot;/&amp;quot;. &lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Dear Hilary,&lt;/p&gt;
&lt;p&gt;many thanks for your reply - but sorry - no change - same error...&lt;/p&gt;
&lt;p&gt;But I found this in the MSE Help:&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;&amp;nbsp;&amp;nbsp;In some cases, calling the ExecuteAction method from the OnClick event for a button in a view may cause an error. This is because the selected context changes to the button when the button is clicked. In this case, it is better to use a button (or link) on a custom task pane, toolbar, or menu to call the&amp;nbsp;ExecuteAction method.&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;so I moved my code onto a custom toolbar with a button and this code:&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;Sub CopySmartKey_OnClick()&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; Dim objXMLNodes&lt;br /&gt;&amp;nbsp;&amp;nbsp; Dim objXMLNode&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; set objXMLNode = XDocument.DOM.selectSingleNode(&amp;quot;/my:myfields/my:SmartKeyValue&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp; XDocument.View.SelectNodes(objXMLNode)&lt;br /&gt;&amp;nbsp;&amp;nbsp; XDocument.View.ExecuteAction(&amp;quot;Copy&amp;quot;)&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And now I&amp;#39;m getting this error:&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;The following error occurred:&lt;/p&gt;
&lt;p&gt;The specified pxnStartNode value for the View.SelectNodes call is not valid.&lt;br /&gt;File:script.vbs&lt;br /&gt;Line:25&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Line:25 is XDocument.View.SelectNodes(objXMLNode)&lt;/p&gt;
&lt;p&gt;What I do not understand is that in the InfoPath 2003 Help the code is written like this:&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;function SelectEmployee()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; var objXMLNodes;&lt;br /&gt;&amp;nbsp;&amp;nbsp; var objXMLNode;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; objXMLNode = XDocument.DOM.selectSingleNode(&amp;quot;/employees/employee&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; XDocument.View.SelectNodes(objXMLNode);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; objXMLNodes = XDocument.View.GetSelectedNodes();&lt;br /&gt;&amp;nbsp;&amp;nbsp; if (objXMLNodes.Count &amp;gt; 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.UI.Alert(objXMLNodes(0).nodeName + &amp;quot;\n\n&amp;quot; + objXMLNodes(0).text);&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But when I put this code into the Microsoft Script Editor the code throws out errors... so I modified it to the above mentioned code I&amp;#39;m trying to use!&lt;br /&gt;Why is microsoft so confusing a NewBe with a lot of code in the help that doesn&amp;#39;t work!? &lt;br /&gt;I also tried the code setting the InfoPath 2003 form to JScript and VBScript but does not make any difference.&lt;/p&gt;
&lt;p&gt;Any hints?&lt;/p&gt;
&lt;p&gt;Cheers Joerg&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/34943.aspx</link><pubDate>Wed, 26 Nov 2008 16:46:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34943</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34943.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34943</wfw:commentRss><description>&lt;p&gt;I&amp;#39;d guess the &amp;quot;//&amp;quot; before my:myfields should be &amp;quot;/&amp;quot;. The object required error means your code to the right of the = sign in your set statement is not returning a value. Generally, this is caused by incorrect XPath..... &lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/34932.aspx</link><pubDate>Wed, 26 Nov 2008 11:05:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34932</guid><dc:creator>Joerg Knoerchen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34932.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34932</wfw:commentRss><description>&lt;p&gt;As no one replies anymore I startet to do my own tests...&lt;/p&gt;
&lt;p&gt;First of all I simply would like to look if I can read a value given in a field called SmartKey&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;p&gt;&lt;b&gt;Sub copyButton_OnClick(eventObj) &lt;/b&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;b&gt;Dim Hello&lt;br /&gt;Dim SmartValue &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;set SmartValue = XDocument.DOM.selectSingleNode(&amp;quot;//my:myfields/my:Smartkey&amp;quot;).text &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Hello = MsgBox(SmartValue, 0, &amp;quot;Testfenster&amp;quot;) &lt;/b&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;b&gt;End Sub&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;But it throws out this error:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The following error occurred:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Object required: &amp;#39;XDocument.DOM.selectSingleNode(...)&amp;#39;&lt;br /&gt;File:script.vbs&lt;br /&gt;Line:23&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Line 23 is this: &lt;/p&gt;
&lt;p&gt;&lt;b&gt;set SmartValue = XDocument.DOM.selectSingleNode(&amp;quot;//my:myfields/my:Smartkey&amp;quot;).text &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;What I have is InfoPath 2003 set to the form to use VBScript. What have I done wrong, do I have to include something or do I need to configure/setup InfoPath in a special way?&lt;br /&gt;The data I would like to copy is located at the actual opened and displayed form in info path...&lt;/p&gt;&lt;p&gt;And then what comes next? How to copy the SmartValue content to the clipboard? &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Hope you can help out...&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Joerg&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/34789.aspx</link><pubDate>Mon, 24 Nov 2008 11:15:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34789</guid><dc:creator>Joerg Knoerchen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34789.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34789</wfw:commentRss><description>&lt;p&gt;Hi Jimmy,&lt;/p&gt;
&lt;p&gt;until now no one replied :-( &lt;/p&gt;
&lt;p&gt;Are you able to make this work with JScript or VBScript?&lt;/p&gt;
&lt;p&gt;Many thanks in advance...&lt;/p&gt;</description></item><item><title>Re: Button to copy and paste a field on an InfoPath form to the clipboard</title><link>https://www.infopathdev.com:443/forums/thread/34606.aspx</link><pubDate>Thu, 20 Nov 2008 15:16:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34606</guid><dc:creator>Joerg Knoerchen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34606.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34606</wfw:commentRss><description>&lt;p&gt;Dear Jimmy,&lt;/p&gt;
&lt;p&gt;again many&amp;nbsp;thanks for your help...&lt;/p&gt;
&lt;p&gt;When I open my form I found a section where I can change the setting, but it gives me only JScript or VBScript...&lt;/p&gt;
&lt;p&gt;Would be great to get a solution... :-)&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Joerg&lt;/p&gt;</description></item></channel></rss>