I'm trying to build an InfoPath add-in to allow template editors (as opposed to end users) to preview the form with sample data populated.
First, a little background on our environment. We have a custom process that connects to MOSS, downloads the appropriate datasource assemblies for a given form, and invokes them to load data from the database into the form (such as recipient address information in a letter template). This process is launched when the form is downloaded and passed parameters (via the URL) for the data retrieval. I am able to approximate this behavior by passing parameters to a locally saved form template via the command line.
Armed with that knowledge, I set out to build an InfoPath add-in that would do the following:
I referred to various online tutorials and Apress' Pro InfoPath 2007 for guidance along the way, and like previous posts on here, discovered the information available to be very limited. I'm part way there, but ran into a few issues:
Any ideas or suggestions? Thanks in advance for your help!
Are you aware of the Form Options -> Preview tab? In there you can set a form to use when previewing the template. It sounds like this is what you are looking to do. Possibly use the addin to modify a default preview form and then the user simply clicks preview to see your sample data.