S
S
starkdm2015-06-26 22:42:10
Visual Basic
starkdm, 2015-06-26 22:42:10

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

1 answer(s)
S
Spetros, 2015-06-26
@Spetros

Walkthrough. Creating the first add-in...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question