locked
Looking at doing Add-in RRS feed

  • Question

  • I am looking at maybe doing a Word add-in.  Let me describe what I have now to see if it is possible.  I currently have a VBA addin that interacts with an Access database and creates numerous documents.  All the forms to edit the database are in the addin.  Each document that is created is based on a template.  The template has bookmarks so the addin knows where to place information.  If a table is required the template has a base table with 1 or 2 rows that can be increased as needed by the addin.  The addin was initially created in 2002 and enhanced over the years and is used by a small company that has less than 15 users.

    Last year I wanted to provide broader access so I created a web interface for some of the forms that basically duplicates the forms in the addin.  It uses HTML5, Javascript, CSS, PHP, Ajax and Jquery.  I use the Foundation Framework to create HTML.  I use PHP and ODBC to access Access.  To create the documents I created a special Word addin that acts like a server.  I have Word 2010 installed on the Web server (Apache).  I use Ajax to pass a request to create a doc and pass back a links to the doc, pdf and file location.  This seems to work well on all devices I have tried phones, tablets etc but I was looking at doing it a more standard way.

    List of features required:

    1. Create doc from template
    2. Save doc to location on server
    3. Write text or image to bookmark location
    4. Locate table and add row to table
    5. Insert text into table
    6. Read contents of table
    7. Insert image in table
    8. Update some doc properties like Author, Title etc.

    9. Merge documents located on server

    What is possible?
    Monday, October 19, 2015 9:58 PM

Answers

  • Hi,

    An  Office Add-in is a web application hosted in a browser control or iframe running in the context of an Office application. Add-ins can access data in the current document or mail item, and connect to web services and other web–based  resources.  To develop add-ins, you use web standards-based technologies, such as HTML5, JavaScript, CSS3, XML, and REST APIs. An add-in isn't actually installed on the computer running the Office host application; its implementation is hosted on a web server, so you can easily maintain and update it from that server.

    1. Create doc from template(No)
    2. Save doc to location on server

    Yes, we are able to get the file content via Document.getFileAsync and post the data into the server. Or we can open the document from the web location and save it directly(refer to Share a document using SharePoint or OneDrive).

      3. Write text or image to bookmark location

      No. We are able to manipulate the data in the selection or binding object currently and Word doesn't support to bind the bookmark now.

      4. Locate table and add row to table

          Yes, we can bind the table in Word add-in and manipulate the table through TableBinding object.

       5. Insert text into table

           Yes, we can set the data via Binding.setDataAsync method.

       6. Read contents of table

         Yes, we can get the data via Binding.getDataAsync method.

       7. Insert image in table

          Yes, we can set the data via HTML or OOXML to insert the images. Here is an helpful blog for your reference:
    Inserting images with apps for Office

       8. Update some doc properties like Author, Title etc.

       No.

       9. Merge documents located on server

       No, Office add-in doesn't provide such technology. It enable users interact with the documents. However, we can using Open XML in Office add-ins to merge documents. Here is an helpful link below:
    Open XML SDK: Merging Documents

    You can get more detail about Office add-ins from link below:
    Office Add-ins platform overview

    In addition, I suggest that you ask one question per thread, so that others can understand the issue exactly and you would get more effective response.

    Hope it is helpful.

    Regards & Fei

    Binding.setDataAsync method

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by mogulman52 Tuesday, October 20, 2015 12:32 PM
    Tuesday, October 20, 2015 3:38 AM

All replies

  • Hi,

    An  Office Add-in is a web application hosted in a browser control or iframe running in the context of an Office application. Add-ins can access data in the current document or mail item, and connect to web services and other web–based  resources.  To develop add-ins, you use web standards-based technologies, such as HTML5, JavaScript, CSS3, XML, and REST APIs. An add-in isn't actually installed on the computer running the Office host application; its implementation is hosted on a web server, so you can easily maintain and update it from that server.

    1. Create doc from template(No)
    2. Save doc to location on server

    Yes, we are able to get the file content via Document.getFileAsync and post the data into the server. Or we can open the document from the web location and save it directly(refer to Share a document using SharePoint or OneDrive).

      3. Write text or image to bookmark location

      No. We are able to manipulate the data in the selection or binding object currently and Word doesn't support to bind the bookmark now.

      4. Locate table and add row to table

          Yes, we can bind the table in Word add-in and manipulate the table through TableBinding object.

       5. Insert text into table

           Yes, we can set the data via Binding.setDataAsync method.

       6. Read contents of table

         Yes, we can get the data via Binding.getDataAsync method.

       7. Insert image in table

          Yes, we can set the data via HTML or OOXML to insert the images. Here is an helpful blog for your reference:
    Inserting images with apps for Office

       8. Update some doc properties like Author, Title etc.

       No.

       9. Merge documents located on server

       No, Office add-in doesn't provide such technology. It enable users interact with the documents. However, we can using Open XML in Office add-ins to merge documents. Here is an helpful link below:
    Open XML SDK: Merging Documents

    You can get more detail about Office add-ins from link below:
    Office Add-ins platform overview

    In addition, I suggest that you ask one question per thread, so that others can understand the issue exactly and you would get more effective response.

    Hope it is helpful.

    Regards & Fei

    Binding.setDataAsync method

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by mogulman52 Tuesday, October 20, 2015 12:32 PM
    Tuesday, October 20, 2015 3:38 AM
  • Fei, I want to thank you for the very detailed answer.  There are 2 critical capabilities missing for me:

    1. Ability to create a doc based on a template.  The templates contain all the formatting, styles, headers/footers, text, tables and bookmarks required for the document. Except for the most basic documents this is an absolute must.

    2. Access bookmarks.  This is critical to insert information into doc in the correct location.  This goes with #1.

    Although not as critical being able to update properties like title, author etc is a document control requirement.

    I'll track this to see if these capabilities are added and try it at that time.

    Tuesday, October 20, 2015 12:55 PM