Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    How to create a toolbar button that opens a file? (2002)

    How do I create a button on the Standard toolbar that opens

    Cocuments and SettingsJonathan RickMy DocumentsPersonalAutobiographicalMy Journal.doc

    Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to create a toolbar button that opens a file? (2002)

    Select Tools | Macro | Macros...
    In the Macro Name box, type a name, for example MyJournal (without spaces).
    Click Create.
    This will activate the Visual Basic Editor.
    Press Tab, then type

    Documents.Open "Cocuments and SettingsJonathan RickMy DocumentsPersonalAutobiographicalMy Journal.doc"

    Switch back to Word.
    Select Tools | Customize...
    Activate the Commands tab (if necessary)
    Select Macros in the Categories list on the left hand side.
    Locate the macro you just created in the list on the right hand side (it will probably be listed as Normal.NewMacros.MyJournal)
    Drag it to your Standard toolbar.
    Right-click the new toolbar button and customize it the way you want (you can display a caption, or an icon, or both)
    Close the Customize dialog.

  3. #3
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: How to create a toolbar button that opens a file? (2002)

    Perfect! Thanks again Hans.

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to create a toolbar button that opens a fi

    There is one other method for doing this.
    1. Go to Tools/Customize... & drag any button to a toolbar (or use an existing button).
    2. Right click the button & give it a name.
    3. Then choose Assign/Hyperlink/Open & browse for the file that you wish.

    If you create a dropdown toolbar (Tools/Customize.../Commands tab/Categories=New Menu), you can assign a number of hyperlinks to open files (sort of a personalized permanent Work menu). If you use the ampersand (&) in front of a letter or number on each button, you can call documents using the keyboard very quickly. e.g. if you're dropdown toolbar is named &C Drive, & your document is called by a button named &Journal, you can type Alt,C,J to bring up your document.

  5. #5
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: How to create a toolbar button that opens a fi

    Thanks Phil!

  6. #6
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: How to create a toolbar button that opens a file? (2002)

    Hi Hans,

    I've been using this macro happily, but with one annoyance: whenever I click the icon, the Web toolbar appears subsequently.

    But I neither need nor want this toolbar, and I need to manually close it.

    Is there any way to prevent the Web toolbar from appearing after I click on the macro icon? Is there another way to open my document via an icon without triggering the Web toolbar?

    I tried Phil's suggestion, but to no avail.

    Many thanks, and happy holidays!

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to create a toolbar button that opens a fi

    <hr>I tried Phil's suggestion, but to no avail<hr>
    Hi Jonathan:
    That's distressing. <img src=/S/smile.gif border=0 alt=smile width=15 height=15> It's got to work. Did you create a toolbar that looked something like the attachment?
    Attached Images Attached Images

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to create a toolbar button that opens a file? (2002)

    It has always worked for me, so I don't know why it doesn't for you.

    The URL you provided doesn't work (HTTP 404 error)

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to create a toolbar button that opens a file? (2002)

    If you had saved the screenshot as a .png file, it would have been 21 KB instead of 1595 KB <img src=/S/mad.gif border=0 alt=mad width=15 height=15>

    It doesn't tell me anything new. Have you actually restarted Word?

  11. #11
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: How to create a toolbar button that opens a file? (2002)

    <P ID="edit" class=small>(Edited by Jon_Rick on 19-Dec-04 19:13. (1) Corrected URL; (2) Changed BMP to PNG)</P>Hi Hans,

    Thanks; that's exactly what I needed.

    Except it doesn't work [img]/forums/images/smilies/sad.gif[/img].

    It seems so simple, so I took a screen shot:

    http://students.hamilton.edu/2005/jrick/macro.png

    Can you think of what's wrong?

    Note: To be certain there weren't any conflicts, I deleted all my macros from Normal.dot, via both Tools | Macro | Macros and Tools | Macro | Macros | organizer...

    Many thanks!

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to create a toolbar button that opens a file? (2002)

    Sorry, no idea. I just tested it again to make sure - it works fine.

    PS You could easily have attached the screenshot to your post instead of letting us download it from another site.

  13. #13
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: How to create a toolbar button that opens a file? (2002)

    <P ID="edit" class=small>(Edited by Jon_Rick on 19-Dec-04 19:27. )</P>Sorry again; you can now view it as a PNG file within my previous post.

    Restarted--Word and Windows--many times...

  14. #14
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: How to create a toolbar button that opens a file? (2002)

    (Edited by HansV to reduce screenshot in size)

    So sorry. Here it is as an attachment:
    Attached Images Attached Images

  15. #15
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: How to create a toolbar button that opens a file? (2002)

    Funny, the toolbar only reappears when I click on the icon; it does not reappear when I click on an actual hyperlink in a document.

    Also, running the macro when the toolbar is visible removes it.

    Just to make sure we're on the same page, here are the steps I took:

    1. Tools | Macro | Macros
    2. Type in AutoExec
    3. Click Create
    4. Paste in CommandBars("Web").Enabled = False at the cursor

    so that it looks like this:

    Sub AutoExec()
    '
    ' AutoExec Macro
    ' Macro created 12/19/2004 by Jonathan Rick
    '
    CommandBars("Web").Enabled = False
    End Sub


    5. File | Close and Return to Microsoft Word
    6. Restart Word
    7. Click on my icon to open My Journal.doc

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •