Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Amanda Ennis Amanda Ennis is offline
external usenet poster
 
Posts: 2
Default Word: Need form's CommandButton to open another doc. HOW?

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

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

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2003 Word User Form VBE controls toolbox CommandButton lostlawyer Microsoft Word Help 2 March 24th 08 07:36 PM
Typing in one form's text box affects all others ScarlattiEGB Microsoft Word Help 3 November 16th 06 10:41 AM
Select more than one item in a Word form's drop-down list? kmoses Microsoft Word Help 2 August 1st 06 05:53 PM
UserForms: CommandButton Help Wendy D Microsoft Word Help 2 August 16th 05 09:34 PM
CommandButton on printout bob engler Page Layout 1 August 9th 05 01:23 PM


All times are GMT +1. The time now is 02:54 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"