Title on taskbar - InfoPath Dev
in

InfoPath Dev

Title on taskbar

Last post 02-28-2007 04:06 PM by jesse. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 02-16-2007 08:56 PM

    • jesse
    • Not Ranked
    • Joined on 02-16-2007
    • Posts 8

    Title on taskbar

    I have several forms that I created in Infopath. However, The show up as Form# (# changes as the forms are opened) However This makes it hard to know which form to click on by looking at the taskbar. Is there a way to change the name of the form on the taskbar so you know which one it is?

    Thank you for your time.

    Jesse
  • 02-18-2007 01:16 PM In reply to

    Hi Jesse and welcome to our forum!
    You can access the form's name through the XDocument.URI property:
    Application.XDocuments(XDocument.URI);
    Patrick Halstead
    Project Manager at Qdabra
  • 02-18-2007 04:46 PM In reply to

    • jesse
    • Not Ranked
    • Joined on 02-16-2007
    • Posts 8
    Thank you for your response. I can't seem to get it to work. I am not sure if I am doing it right. The help files stink. I want it to say Log instead of form.

    Jesse
  • 02-18-2007 11:38 PM In reply to

    Hi again,
    You should be able to change the name using an Open rule and some code. Go to Tools-Form Options and click General (InfoPath 2003) and select Open and Save rules. Add a rule with custom code. In that rule, change the value of the URI. Good luck!
    Patrick Halstead
    Project Manager at Qdabra
  • 02-19-2007 12:10 AM In reply to

    • jesse
    • Not Ranked
    • Joined on 02-16-2007
    • Posts 8
    thanks again for replying. I guess I am just doomed to fail. I tried the following

    1. clicked on Tools
    2. clicked on form options
    3. clicked on the open and save tab
    4. Clicked on rules
    5. clicked on add
    6. clicked on Add action
    7. Clicked on show a dialog box expression.
    8. typed Application.XDocuments(XDocument.log);
    get error that ; is not valid
    tried it without the ; and get xdocument is not valid
    I changed it to Application.XDocuments(XDocument.log);
    That didn't work
    I tried Application.XDocuments(log);
    and that didn't work
    I also tried the following
    1. Tools
    2. Programming
    3. Microsoft script editor (I tried it in jscript and vbscript)
    4. I tried Application.XDocuments(XDocument.URI); didn't work says expecting end of statement.
    5. I tried Application.XDocuments(XDocument.URI); } still didn't work
    6. I tried Application.XDocuments(XDocument.log); with the above variations and it didn't work.
    7. I tried Application.XDocuments(log); and it didn't work.

    Here is the code on the microsoft script editor

    ' This file contains functions for data validation and form-level events.
    ' Because the functions are referenced in the form definition (.xsf) file,
    ' it is recommended that you do not modify the name of the function,
    ' or the name and number of arguments.

    ' The following line is created by Microsoft Office InfoPath to define the prefixes
    ' for all the known namespaces in the main XML data file.
    ' Any modification to the form files made outside of InfoPath
    ' will not be automatically updated.
    '<namespacesDefinition>
    XDocument.DOM.setProperty "SelectionNamespaces", "xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:q=""http://schemas.microsoft.com/office/infopath/2003/ado/queryFields"" xmlns:d=""http://schemas.microsoft.com/office/infopath/2003/ado/dataFields"" xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"" xmlns:my=""http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-01-27T13:26:47"" xmlns:xd=""http://schemas.microsoft.com/office/infopath/2003"""
    '</namespacesDefinition>


    '=======
    ' The following function handler is created by Microsoft Office InfoPath.
    ' Do not modify the name of the function, or the name and number of arguments.
    '=======
    {
    Sub XDocument_OnLoad(eventObj)
    ' Write your code here

    Application.XDocuments(XDocument.log);
    End Sub
    }

    NOTE: I tried it without the { before the Sub XDocument and the } after the End Sub.

    Sorry to be a pain.

    Jesse
  • 02-26-2007 09:12 AM In reply to

    Hmm. I think that form# name you're trying to change is the file name. I believe that the only way to get that to show up differently is to actually save the file so it has a name to display in the task bar label. Unless the form is full-trust you won't be able to save the form programmatically b/c of security. I'm curious where are you opening the multiple forms from? Maybe I have your scenario wrong. Thx.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-26-2007 07:05 PM In reply to

    • jesse
    • Not Ranked
    • Joined on 02-16-2007
    • Posts 8
    I have it stored on the network folder called logform. It is fully trusted. I actually have three to four different forms open at one time. I will have my phone log form, my student services form open and my troubleshooting form open. All three are fully trusted. When I first open them the troubleshooting will be on the bottom, the student services will be in the middle and the phone log will be on top. However, when I fill out the troulbeshooting form and submit it, it then appears on top of the phonelog. The forms will flip flop as I submit the forms. The problem I am facing is that, I can't look at the title bar and know which form is which without clicking on them. There is a way to get the name to show but cannot get the code to work.

    Thank you for your reply.

    Jesse
  • 02-28-2007 07:32 AM In reply to

    You're welcome. I see what you're saying. I'm still confused that if the title bar shows the form filename then why doesn't it show in the task bar.

    Two drastic options are:
    1) Put all the forms into one template and then have in form UI (buttons) to switch to the correct views as needed.
    2) Use IP2007 hosting feature to host everything in your own WinForm application which would allow you to create a custom integrated dashboard for this application. This is not for the faint of heart but would give you tons of control over the windowing and many other aspects of the overall experience.

    Sorry I couldn't be more help.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-28-2007 04:06 PM In reply to

    • jesse
    • Not Ranked
    • Joined on 02-16-2007
    • Posts 8
    I do appreciate the response. That is a possible idea about merging all the forms.

    Jesse
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.