New to VBA in Word

A

Alex

Hope someone can help with this really simply task - I can use VBA in Access
but have never used in Word. I am just trying a few things out and have got
stuck on first one - displaying a message box !!

Have opened New document and saved as Document1.doc
Have gone to VBA - selected Project (Document1) | Micrtosoft Word Objects |
ThisDocument.

Have entered the following code:

Private Sub Document_Open()
MsgBox "Bingo!"
End Sub

have saved the document again, but when I open the document I get the VBA
Toolbox and the VBA Exit Design Toolbar.

Help please - what have I done !!!

Thanks

Alex
 
J

John

Alex

Does word ask you to enable macros when you open the
document? If not, then your Macro Security setting is set
to High. You need to change it to Medium (or Low), so you
can enable macros. It's under Tools | Macros | Security.

John
 
E

Ed

Alex:

I did a Google search using "design toolbar open group:*word*".
Unfortunately, I don't know how to give you the reference to a specific
article. From reading a few, though, it seems that you may have your macro
security in Word set to HIGH, which apparently prompts Design mode. I may
have missed the issue entirely, but this seems like a good place to start.

Ed
 

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