Macro created in Word doesn't work

D

Dave Neve

Hi

I'm completely new to VB and I'm using a book to get aquainted with it.

However, I would also like to use the option 'create macro' in Word as a
halfway house to create some macros and see how they work.

Problem is my very first macro created this way (while editing a .doc)
doesn't work.

As the instructions are through Word with the keyboard, I can't understand
why it won't run and as I can't really understand code yet, I'm unable to
debug.

The bug is indicated by VBA as being in the following bit of code and I was
wondering if someone could indicate the error and correct it?


Thanks in advance

NormalTemplate.AutoTextEntries("Madame, Monsieur,").Insert Where:= _
Selection.Range, RichText:=True
End Sub
 
J

Jezebel

That macro code will work provided your normal.dot includes an AutoText
entry called "Madame, Monsieur," and not otherwise.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top