none
InfoPath 2007 & VSTO add-in... looking for more resources. RRS feed

  • Question

  • Hi,

    I am trying to develop an application add-in for InfoPath 2007 in VB with VS 2008 Pro.  Originally, I wrote it to change some toolbars and add in custom menus/task pane (which work nice) but I was looking to extend it to also control certain events.

    Specifically, I was looking to handle certain application events in the InfoPath form but most of the handles do not fire as expected.  For instance, when I click on a xsn served up my webserver, the XDocumentOpen event doesn't fire.  If I make changes to the form and I try to close the form, a Save dialog pops up prior to the XDocumentBeforeClose event fires up, where I have my setDirty(false) statement to prevent saves.  Doing a test submit of the form shows the same behavior... after successful submit, InfoPath asks to Save and if I say No, then the XDocumentBeforeClose event fires.  Strange to say the least.

    First question I have is... are there any other formal resources like a dedicated InfoPath add-in guide/book I can get that may give me a little more color as to why this is happening?  I don't have the option of adding code to the InfoPath forms so I am strictly looking to hook the form-level events from the application - if that's even possible.

    Second, although I have programmed several Word 2007 VSTO add-ins in VB, should I switch languages to say, C#?  From what I can tell, it seems to be the language of choice with add-ins.  I just chose VB because I am most familiar with the syntax.

    Thanks for any advice or help in advance.

    Sunday, November 14, 2010 5:32 AM

Answers

  • Hi Limesmj

    I'm going to move this question to the "General Office Developer" forum, as it would be the more appropriate place for it. The only thing VSTO provides for InfoPath is the framework for creating an add-in, so there's not going to be a lot of technical expertise on InfoPath, itself.

    Besides the "General" forum, there's an InfoPath-specific forum on the "Answers" site, which - although it formally targets end-users, is where you're most likely to find the application specialists. They may have some useful information.

    http://social.answers.microsoft.com/Forums/en-US/group/Office

    As to the question of VB vs. C#: stick with VB. The differences in the two languages are very few, and none of those at the level of working with an office application. You may see a lot of code examples in C#, but that's often a case of trying to counter-balance the fact that most of the Office programming documentation is in VB(A). But as far as what can be done, the two languages are "equal". If you ever have difficulty "converting" some code to VB we can help you with that.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Friday, November 19, 2010 8:48 AM
    Sunday, November 14, 2010 5:53 AM
    Moderator

All replies

  • Hi Limesmj

    I'm going to move this question to the "General Office Developer" forum, as it would be the more appropriate place for it. The only thing VSTO provides for InfoPath is the framework for creating an add-in, so there's not going to be a lot of technical expertise on InfoPath, itself.

    Besides the "General" forum, there's an InfoPath-specific forum on the "Answers" site, which - although it formally targets end-users, is where you're most likely to find the application specialists. They may have some useful information.

    http://social.answers.microsoft.com/Forums/en-US/group/Office

    As to the question of VB vs. C#: stick with VB. The differences in the two languages are very few, and none of those at the level of working with an office application. You may see a lot of code examples in C#, but that's often a case of trying to counter-balance the fact that most of the Office programming documentation is in VB(A). But as far as what can be done, the two languages are "equal". If you ever have difficulty "converting" some code to VB we can help you with that.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Friday, November 19, 2010 8:48 AM
    Sunday, November 14, 2010 5:53 AM
    Moderator
  • Thank you and I'll stick with VB per your advice. :)
    Sunday, November 14, 2010 8:49 AM