Getting Information About the InfoPath Template

Applies to: SharePoint Workspace 2010 | Visual Studio 2008

ReadInfoPathTemplate returns the template that defines the specified InfoPath form. The template defines the fields and visual design of the form but does not contain any data. When you are designing or publishing a form, InfoPath stores the template in an .xsn file.

The proxy code generated by Microsoft Visual Studio® 2008 provides access to the contents of the InfoPath template as a byte array named Item. For example:

GrooveForms2.InfoPathTemplate ipTemplate = forms2Svc.ReadInfoPathTemplate(formURI);

byte [] templateContents = ipTemplate.Contents.Item;
string templateURN = ipTemplate.URN;
string publishURL = ipTemplate.PublishURL;
string version = ipTemplate.Version;

See Also

Reference

GrooveForms2.ReadInfoPathTemplate Operation

Concepts

Accessing Forms Tool Design Information