Creating InfoPath 2007 Beta 2 Template Part Files in VSTO

cabarc N “$(TargetDir)$(ProjectName).xtp” “$(ProjectDir)InfoPath Form Template*.*” >> “$(TargetDir)BuildXtp.log”
This will drop a .xtp file into the target directory (ie bin\debug) when you rebuild your template part. It will also drop a log file in the same location. #

technorati tags:, , , , , , #

Categorised as: Tech


  1. Vivek.T says:


    After creating the InfoPathFormTemplate Project i cannot do any operation in my Visual Studio 2005, for any operation it show me the error message “Visual studio has encountered an unexpected error”

    Can you suggest me any solution to solve this problem.



  2. Ken says:

    trying to figureout to get the values from controls in a repeatable region. Any suggestions

  3. Mark says:

    My brief stint with InfoPath is over and I most likely wont’ be going back to it (we went for Asp.Net 2.0 instead).You don’t mention whether you want to do this in a web form or the rich client – or whether you want to do it in code or not. I’m assuming you want to do it in code, i’m not assuming any client type.
    The way I would approach this would be to use a rule (or do my submit via code) that executes code on the server side, then use some code to loop through the main data source for the form (assuming thats where the repeatable region is stored) using an XPathNavigator (System.Xml.XPath).

    The following code should give you an idea on the process, even though its not exactly what you were/are trying to achieve. (no error handling here by design – I also havent run this code, it probably wouldn’t even compile)

    // get an iterator for a group of people
    XPathNodeIterator persons = this.MainDataSource.CreateNavigator()
    .Select("/q0:Messsage/q0:People/q0:person", this.NamespaceManager);
    // initialize the iterator to the first person
    while (persons.MoveNext())
    // access the detail for an individual person, for example
    // get the name of the person
    string name = persons.Current
    .SelectSingleNode("q0:Name", this.NamespaceManager);

    Which, in this case, iterates through all the people nodes of a sample document and extracts the name.

    Not sure if this is at all helpfull, but you never know :)