Word: Need form's CommandButton to open another doc. HOW?

A

Amanda Ennis

I'm making a form in Word. I am usually quite fluent...but can not figure out
how to tell a CommandButton what to do. HELP!!
 
J

Jay Freedman

Is this a command button from the Control Toolbox placed in the body
of the document? (There are at least two or three other kinds of
buttons in other places.)

If so, while you're in Design Mode, double-click the button to open
its code window, which will contain two lines of code. Fill in the
middle line below, using the actual path and name of an existing
document between the quote marks:

Private Sub CommandButton1_Click()
Documents.Open FileName:="doc1.docx"
End Sub

If that isn't exactly what you had in mind, please add more details
about what you want the button to do.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

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