views:

326

answers:

2

I'm experimenting with creating an add-in for Infopath 2007. The documentation is very skimpy. What I'm trying to determine is what kind of actions an add-in can take while designing a form. Most of the discussion and samples are for when the user is filling out the form. Can I, for example, add a new field to the form in the designer? Add a new item to the schema? Move a form field on the design surface? It doesn't appear so, but I can't find anything definitive.

A: 

There is no Object Model for the InfoPath designer.

I believe the closest that you can get is the exposed API for the Visual Studio hosting that InfoPath supports; but I don't believe that this will give you the programatic control of the designer that you'd like.

http://msdn.microsoft.com/en-us/library/aa813327.aspx#office2007infopathVSTO_InfoPathDesignerAPIIntegratingInfoPath2007VisualStudio

Sorry Kevin.

bryansh
A: 

Unfortunatly Bryan is probably right. And I have tried to make a VS plugin for use with InfoPath development. It is very restrictive and hard to use. Not very effective for quick scripting work.

I have found AutoHotKey to be the best ad hoc scripting tool for use with InfoPath. It doesn't integrate directly with InfoPath, but I have found key+mouse automation to accomplish most of what I have needed.

oillio