Forum Discussion

AnzaGen's avatar
AnzaGen
Copper Contributor
May 25, 2023

Create Word Plugin to Insert remote content in remote SharePoint Library into local Word document

 

I am planning to create a Word Plugin to insert content (Word, PowerPoint) located in an external SharePoint Library into an existing Word document

 

Here are the various participants

Local User -> local Word Doc -> Word Plugin -> External SharePoint Library -> External Word Doc 1, 2

 

Here, is the proposed workflow of how the plugin should work

  • User installs plugin in local Word on Windows / macOS
  • User opens local Word and plugin is installed
  • User clicks on plugin icon in toolbar in local Word and is asked to select destination SharePoint document library
    • Plugin checks if user is already authenticated and if yes, then shows the user the SharePoint document library
    • If user is not authenticated, plugin proceeds to authenticate user (using Microsoft 365 built-in auth flow - email, password, MFA if present)
  • Document library can be accessed and is viewable after authentication
  • User can click in Word document where they would like to insert the content
  • User clicks on plugin, SharePoint library is displayed, they select an external word document within destination SharePoint library
  • User inserts external word document within current word document
  • Contents of external word document are inserted into existing word document

 

Can anyone provide some guidance on

  1. What would be involved (prerequisite knowledge, languages, SDKs)? (I've never created a plugin before)
  2. How to get started with this? (Resources)
  3. How would this work with both Windows and macOS?

 

1 Reply

  • AnzaGen VBA is all that I know, so I googled for VBA access to sharepoint library, which turned up quite a few promising leads.  While most of them are for opening an Excel file that is on sharepoint, the process would be the same for accessing a Word file.

    The correct term for what you are referring to as a Plugin is Add-in, which is a macro enabled template (*.dotm) that is saved in the Word startup folder so that the macros in it are available for use with all documents.

    To provide a userfriendly access to the macros, you will probably want to make use of a UserForm and Ribbon Customization.  Fot information on those, see the following pages of Greg Maxey's website:

    http://gregmaxey.mvps.org/Create_and_employ_a_UserForm.htm

    https://gregmaxey.com/word_tip_pages/customize_ribbon_main.html

    You need to realise that the implementation of VBA on a Mac is not equivalent to VBA on Windows, so there may be some issues with developing an Add-in that can be used on both platforms.

     

     

Resources