Accquiring network location of a Infopath form using vba

52 views Asked by At

I have a network published infopath 2010 form.

I would like this form to display the actual network location it is located in when it loads directly in the form. Right now, the form location is displayed at the bottom of the screen as a part of the Infopath window.

I know how do to do everything else besides getting the network file location using vba. Any ideas? As far as I can tell I can only pull the URI of the form which is specific to SharePoint deployments not Network deployment.

Any ideas would be greatly appreciated! :)

1

There are 1 answers

0
hilary On BEST ANSWER

I ran a quick test and found that when I opened a network published template, this code:

this.Template.Uri.ToString()

Returned the published location in this format:

file:///D:/Documents/Temp/test.xsn

So, you'd need to clean the string up a bit - but this appears to work with network published templates. Were you getting a different result?