Calling existing Macros from A Word 2010 Template into VSTO 2010

Posted on 2012-09-20
Medium Priority
Last Modified: 2013-11-10
Hi all,

I have created a custom ribbon tab using the ribbon editor function in VS 2010. I am able to run the tab and all the buttons display the content desired. I am left to now code the macros from the existing modules into the buttons. I can not figure out how to do this. For an example.
 In the ribbon designer
Button 1 is a Watermarks button called button1
I need this to generate a watermark by running the macro within the Word .dotm, Module is Watermarks and the SUB is WMCONFIDENTIAL.

Please assist. Thank you!

Question by:BEKSUPPORT
  • 2
LVL 36

Accepted Solution

Miguel Oz earned 2000 total points
ID: 38425430
On the button1 event handler, addthe following code:

Open in new window

For more info check:

Author Comment

ID: 38428594
Hi mas_oz2003,

I will give this a shot. Thank you.


Author Comment

ID: 38428659
Hi mas_oz2003,

Thank you so much, it worked beautifully. I just needed to change the ThisDoc to ThisAddIn. Thanks again!


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

755 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question