Answer the question
In order to leave comments, you need to log in
How can I create a Word add-in?
When I create a project in VS, I get one ThisAddIn class and two functions:
Private Sub ThisAddIn_Startup() Handles Me.Startup
Sub ThisAddIn_Shutdown() Handles Me.Shutdown
And what should I do about it? Where to enter this VBA code (see below) to replace hi with hellow in the active document window. I want the replacement to be performed not by a macro, but by an add-on, which, unlike a regular macro, starts automatically. I will then install the add-in with a script.
Set myRange = ActiveDocument.Content
myRange.Find.Execute FindText:="hi", ReplaceWith:="hello", Replace:=2
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question