View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Word: Need form's CommandButton to open another doc. HOW?

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 FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Thu, 11 Mar 2010 16:21:01 -0800, Amanda Ennis
wrote:

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!!