Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Loading own toolbar icons (Word 2000\SR1)

    I have a custom toolbar and I wish to load my own icons instead of using the ones from Word. How do I do this via VBA code?

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Loading own toolbar icons (Word 2000\SR1)

    I hope you find a solution, I found this really difficult.

    In the end I created hidden buttons on my toolbar and copied the icons from those. This works, but overwrites the users paste buffer. I suspect this must be a common problem because even Microsoft products like MapPoint seem to over write the paste buffer with their icons.

    StuartR

  3. #3
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Loading own toolbar icons (Word 2000\SR1)

    It sounds like then you were able to create buttons with their own images and use those, how did you do that. Now I am speaking about a toolbar that is created in a word's doc template via code and not a COM Addin or such. I haven't seen in the VBA a way to create a toolbar via a toolbox like you can a dialog box.

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Loading own toolbar icons (Word 2000\SR1)

    I simply created a toolbar in my Template, using the standard user interface. This toolbar and its buttons have their .Visible and .Enabled properties set to false and are used to store button faces.

    Unfortunately I no longer have the template and I can't remember the code that I used to copy these faces to the clipboard and then paste them to the newly creaetd CommandBar buttons, but I seem to remember that it was something fairly simple.

    StuartR

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

    Re: Loading own toolbar icons (Word 2000\SR1)

    Hi Jim:
    I can't help with the code, but I know there is an Excel template that gives the faceid numbers for every button. I also had, but haven't tried, a couple of web site addresses for utilities that simplified this. Perhaps this will help give you an idea how to simplify your task. The 2 utilities are found at:

    http://www.j-walk.com/ss/excel/tips/tip67.htm
    http://officerone.tripod.com/faceid/

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

    Re: Loading own toolbar icons (Word 2000\SR1)

    If you do a Lounge-wide search for CommandBars.Add, you will find examples of creating a toolbar in code, for example in <post#=220198>post 220198</post#>. CommandBar controls have methods CopyFace and PasteFace that you can use to set their button face.

Posting Permissions

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