<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Outlook Search in Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/24957.aspx</link><pubDate>Thu, 06 Dec 2007 10:51:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24957</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24957.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=24957</wfw:commentRss><description>i tried to rund your code but receive an Access Denied error for the Collaboration Data Object so i actually cannot test my proposal. if you know how to fix my error it&amp;#39;s may be easier to debug. SOLVED ! stupid me just didn&amp;#39;t work in preview mode.</description></item><item><title>Re: Outlook Search in Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/24954.aspx</link><pubDate>Thu, 06 Dec 2007 08:29:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24954</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24954.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=24954</wfw:commentRss><description>Hi, always a bit hard to debug code just like this but my guess would be that in the OnClick event where you pass the parameters (xPath to your form controls) to the AddPerson method try to use eventObj.Source.selectSingleNode(&amp;quot;my:field1&amp;quot;)</description></item><item><title>Re: Outlook Search in Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/24924.aspx</link><pubDate>Wed, 05 Dec 2007 16:14:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24924</guid><dc:creator>HansRos</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24924.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=24924</wfw:commentRss><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;Cannot get it to work with eventObj.........&lt;br /&gt;This is my code, maybee you can make some sence out of it.&lt;/p&gt;
&lt;p&gt;function GetName::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;try&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;var cdoAddrEntry; // AddressEntry&lt;br /&gt;&amp;nbsp;&amp;nbsp;var strData; // string&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;// JavaScript does not recognize constants!&lt;br /&gt;&amp;nbsp;&amp;nbsp;// Define them explicitly or use their value.&lt;br /&gt;&amp;nbsp;&amp;nbsp;var CdoPR_ACCOUNT = 0x3A00001F;&lt;br /&gt;&amp;nbsp;&amp;nbsp;var CdoPR_DISPLAY_NAME = 0x3001001E;&lt;br /&gt;&amp;nbsp;&amp;nbsp;var CdoPR_EMAIL = 0x39FE001E;&lt;br /&gt;&amp;nbsp;&amp;nbsp;var CdoPR_DEPARTMENT_NAME = 0x3A18001F;&lt;br /&gt;&amp;nbsp;&amp;nbsp;var CdoPR_OFFICE_LOCATION = 0x3A19001F;&lt;br /&gt;&amp;nbsp;&amp;nbsp;var CdoPR_BUSINESS_TELEPHONE_NUMBER = 0x3A08001F;&lt;br /&gt;&amp;nbsp;&amp;nbsp;//Start the CDO code to find a match.&lt;br /&gt;&amp;nbsp;&amp;nbsp;cdoSession = new ActiveXObject(&amp;quot;Mapi.session&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;cdoSession.Logon(null,null,false,false,0);&amp;nbsp;&amp;nbsp; //Use the existing Outlook session.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;// Get the AddressEntry of the recipient/current user.&lt;br /&gt;&amp;nbsp;&amp;nbsp;cdoAddrEntry = cdoSession.CurrentUser;&lt;br /&gt;&amp;nbsp;&amp;nbsp;AddPerson(&amp;quot;//my:field1&amp;quot;, &amp;quot;//my:field2&amp;quot;, &amp;quot;//my:field3&amp;quot;, false);&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;catch(e)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(e.description.lastIndexOf(&amp;#39;MAPI_E_LOGON_FAILED(80040111)&amp;#39;) != -1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;XDocument.UI.Alert(&amp;quot;You need to have Outlook started &amp;quot; +e.description);&lt;br /&gt;&amp;nbsp;&amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;XDocument.UI.Alert(e.description);&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;function AddPerson(nameFieldPath, mailFieldPath, accountFieldPath, allowManySelection)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;var oRecipients = null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;var oTestMessage=cdoSession.Outbox.Messages.Add();&lt;br /&gt;&amp;nbsp;&amp;nbsp;oRecipients=cdoSession.AddressBook(oTestMessage.Recipients, &amp;quot;Select User&amp;quot;, !allowManySelection, true, 1, &amp;quot;Add&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;oRecipients.Resolve();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;if(allowManySelection)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i=1;i&amp;lt;=oRecipients.Count;i++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fillTextBox(nameFieldPath, oRecipients.item(i).AddressEntry.Fields(0x3001001E)+&amp;quot;;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fillTextBox(mailFieldPath, oRecipients.item(i).AddressEntry.Fields(0x39FE001E)+&amp;quot;;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fillTextBox(accountFieldPath, oRecipients.item(i).AddressEntry.Fields(0x3A00001F)+&amp;quot;;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fillTextBox(nameFieldPath, oRecipients.item(1).AddressEntry.Fields(0x3001001E));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fillTextBox(mailFieldPath, oRecipients.item(1).AddressEntry.Fields(0x39FE001E));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fillTextBox(accountFieldPath, oRecipients.item(1).AddressEntry.Fields(0x3A00001F));&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;catch(ex)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;if(ex.description.lastIndexOf(&amp;#39;MAPI_E_USER_CANCEL(80040113)&amp;#39;) == -1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(ex.description.lastIndexOf(&amp;#39;MAPI_E_NOT_INITIALIZED(80040605)&amp;#39;) != -1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XDocument.UI.Alert(&amp;quot;No Address book connection, please close and reopen the form and select a valid Outlook profile&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XDocument.UI.Alert(&amp;quot;Error retrieving user mail. Make sure Outlook is online: &amp;quot;+ex.description);&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;function fillTextBox(textBoxPath, value)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;if(textBoxPath != &amp;quot;&amp;quot;)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;var textBox = XDocument.DOM.selectSingleNode(textBoxPath);&lt;br /&gt;&amp;nbsp;&amp;nbsp;textBox.text += value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;XDocument.UI.Alert(value);&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Many thanks in advance,&lt;br /&gt;Hans&lt;/p&gt;</description></item><item><title>Re: Outlook Search in Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/24914.aspx</link><pubDate>Wed, 05 Dec 2007 12:38:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24914</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24914.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=24914</wfw:commentRss><description>Hi, so I guess that than in the OnClick event of your button you have in each row you also use code to actually write the values into your controls. when you have this button in your repeating section you can actually use the parameter of your button event to always refer to the row you are at the moment. this would mean change your code from XDocument.DOM.selectSingleNode(my:myFields/my:Email&amp;quot;).text = myValue to eventObj.Site.selectSingleNode(my:myFields/my:Email&amp;quot;).text = myValue. if this doesn&amp;#39;t work try eventObj.Source.selectSingleNode not to sure now. does this help ?</description></item><item><title>Outlook Search in Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/24913.aspx</link><pubDate>Wed, 05 Dec 2007 10:45:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24913</guid><dc:creator>HansRos</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24913.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=24913</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a repeating section in an InfoPath 2003 form with three text box controls, DisplayName, Account and Email address.&lt;br /&gt;In this section I have a search button for contacts in Outlook address book.&lt;br /&gt;When I click on it the address book opens and I can select a contact and populate the fields in the first section.&lt;br /&gt;But when I do the same in the second section the values are concatenated with those in the first section and the second one remains empty.&lt;br /&gt;Can anyone please help me since this is urgent. I have done the coding in jscript.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Hans&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>