How could I go about making a custom toolbar in word that once clicked would run a specific macro? Also, is it possible to make some sort of installer that would install this button?
Thanks in advance.
Printable View
How could I go about making a custom toolbar in word that once clicked would run a specific macro? Also, is it possible to make some sort of installer that would install this button?
Thanks in advance.
No one?
Sorry but I can't seem to remember how to create the Word
AddIn .dot to attach to every instance of Word as they get
created, but this should help to actually create the .dot file. The
rest is up to you.
:DVB Code:
Option Explicit 'CREATES A NEW TOOLBAR AND ADDS THE OPEN BUTTON TO IT 'AND DOCKS IT LEFT AND LAST TB ON TOOLBAR ROWS Private Sub Document_Open() Dim oTB As CommandBar Set oTB = Application.CommandBars.Add(Name:="MyToolBar").Visible = True oTB.Controls.Add Type:=msoControlButton, ID:=23, Before:=1, Temporary:=True oTB.Left = 0 oTB.Position = msoBarTop oTB.RowIndex = msoBarRowLast Stop 'UNCOMMENT TO DELETE TOOLBAR 'Application.CommandBars("MyToolBar").Delete End Sub