locked
Can I design Access-like forms in a Word addin? RRS feed

  • Question

  • Hello,

    I using VS 2008 with Word 2007. I am writing an application-level addin for a friend (attorney) to populate documents with data from a database (currently Access 2007).

    They also want to enter data into the database, as would be expected. The issue is that I was hoping to keep things simple and have them enter some of the data directly into the Word addin. It turns out that their data needs are much more complicated than a screen or two in Word.

    I could develop the whole database in Access and have it talk to Word, but I didn't want to get into VBA, I'd rather use C#. Also, then they would have two applications to switch between which I would rather not do, but it is not mandatory.

    Is there a way to design Access-like forms in a Word VSTO addin? Access obviously is much better for this, but I was hoping to keep everything in a single addin.

    Thank you for the help/advice.

    ~J

     

    Wednesday, January 30, 2013 5:35 PM

Answers

  • no, i do not think it is possible, but have you seen data bound windorms forms? you just drag and drop table onto form in design time anfd VS will generatre textboxs, etc. for you. I guess it is very similiar to what you expoct from Access.
    • Proposed as answer by Quist Zhang Thursday, January 31, 2013 8:42 AM
    • Marked as answer by Quist Zhang Friday, February 1, 2013 3:53 AM
    Wednesday, January 30, 2013 7:13 PM

All replies

  • if by access-like you mean forms that will talk to access db file then yes, create standard winforms based windows in your add-in and populate/store data in them using standard data access classes that use your access file.
    Wednesday, January 30, 2013 5:48 PM
  • Hi Damian,

    Thank you for the response, but I apologize for not being clearer.

    I'm aware that I can make winforms in the add-in, but with Access it is so much easier to design forms and subforms. I know I could duplicate what is done in Access, but the time it would take to have each textbox connected to a datasource would be way too long. Plus Access makes is easy to drop a button on the form and assigns a macro to it, like Next, Previous, Search, etc.  And what they need is much too complicated to do in an add-in by hand. Maybe if they were paying me, I could do it ;)

    I guess my question really is, can I design a form in Access or other tool, and bring it into or somehow incorporate it in a VSTO addin? I assume asking a question might get me some nasty responses about how I am living in a fantasy world :)  I know this seem implausible, but I thought I would ask.

    ~J

    Wednesday, January 30, 2013 6:28 PM
  • no, i do not think it is possible, but have you seen data bound windorms forms? you just drag and drop table onto form in design time anfd VS will generatre textboxs, etc. for you. I guess it is very similiar to what you expoct from Access.
    • Proposed as answer by Quist Zhang Thursday, January 31, 2013 8:42 AM
    • Marked as answer by Quist Zhang Friday, February 1, 2013 3:53 AM
    Wednesday, January 30, 2013 7:13 PM
  • I didn't think so. I have seen the data bound windows forms. I know you drag and drop, but what they are looking for just gets more complicated and I was looking for a quick-and-easy fix.

    I realize what I was asking was a bit over the top, but better to know the answer!

    Thank you so much for your help. I really appreciate it.

    ~J

    Wednesday, January 30, 2013 8:41 PM