Gathering infopath 2007 template file name in c# - InfoPath Dev
in

InfoPath Dev

Gathering infopath 2007 template file name in c#

Last post 01-28-2009 06:49 AM by cubanjlm. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-22-2009 01:08 PM

    Gathering infopath 2007 template file name in c#

    Hello.

    I'm new writing code into an infopath template. I've created a template and I've modified the submit event and i want (at some point in the code) to ask for the file name of my template, i have no idea about how can i do it, but i can see just what i need in the state bar of infopath wen i execute my templete. if anyone please could help me i would be grateful.

    thanks

  • 01-22-2009 02:47 PM In reply to

    Re: Gathering infopath 2007 template file name in c#

    Are you using InfoPath 2003 or 2007? I set the InfoPath application caption bar in IP 2003 with this:

    thisApplication.ActiveWindow.Caption = "What I want the caption to be";

    So, I'd guess that you'd be able to get with it something like this:

     thisApplication.ActiveWindow.Caption.ToString();

    Is the caption at the top of the window what you mean by the 'state bar'?

    Hilary Stoupa

  • 01-23-2009 08:54 AM In reply to

    Re: Gathering infopath 2007 template file name in c#

     i'm using IP 2007. i mean the bar that is at the bottom of the IP window. it displays the securyty level icon and the location and file name of the template. i dont want to use the Caption cause it could be changed by code, but the file name of the template is set when the designer saves the template. I was looking for something like this.Application.FileName or this.Application.Lotation but i could'nt find anything.

  • 01-26-2009 08:20 AM In reply to

    Re: Gathering infopath 2007 template file name in c#

    Sorry, I misunderstood. Try this.Template.Uri

    Hilary Stoupa

  • 01-26-2009 01:43 PM In reply to

    Re: Gathering infopath 2007 template file name in c#

     I tried it, and also tried this.Uri, but till does'nt work. the first (the one you said) dieplays the manifest.xsf location and the "this.Uri" shows the name or caption or the template's instance that is currently running ((Preview)Template's Name... Form1... Form n) not the .xsn file name or location, and that's what i really need. If i saved a Template1.xsn file in D, i need some way to gather an string that contains "Template1.xsn" or at least "D:\Template1.xsn" (like the 'state bar' shows).

  • 01-27-2009 08:01 AM In reply to

    Re: Gathering infopath 2007 template file name in c#

    In preview, yes, you'll see the path to the manifest.xsf. Save your form and open it, like a user would to fill it out.... and you should get the full path to the xsn.

    Hilary Stoupa

  • 01-28-2009 06:49 AM In reply to

    Re: Gathering infopath 2007 template file name in c#

    It works perfectly!!! Just as you said. thank you very, very much.
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.