
Font Size macro toolbar buttons...
Using Office 2000, I have written the following two macros: DecreaseFont()
and IncreaseFont() that when applied to a toolbar button in any Office
application, it (should) decrease or increase the selected text's font size
by one accordingly.
Sub DecreaseFont()
Dim n As Integer
n = Selection.Font.Size
n = n - 1
If n <= 1 Then
n = 1
End If
Selection.Font.Size = n
End Sub
Sub IncreaseFont()
Dim n As Integer
n = Selection.Font.Size
n = n + 1
Selection.Font.Size = n
End Sub
What I would like is a way to globally save these macro toolbar buttons so
that they may be utilized within all Office 2000 products. However, from
what I have found, I have to manually create them within each application.
Is it possible to apply the macros to all applications otherwise?
Once the toolbar buttons are created, I have tried to rename the Word
screen tooltip, by right-clicking the button, selecting customize, and then
typing into the name field, but it doesn't change/work with what I want.
It defaults as Decrease Font and Increase Font, when I would like it to say
Decrease Font Size and Increase Font Size accordingly. How can I do this?
I think I was able to rename it using the same technique using Excel and
Outlook, but if not, what options do I have?
After this is done, I'd like to save the macro/toolbar into the normal.dot
file so that Word is reopened, it is available to any document.
When setting it up in Excel, I wasn't able/didn't find a solution to save
the macro toolbar globally like Word's normal.dot file. I had to save it
to the current spreadsheet, and it was available to that file only unless
from another spreadsheet I click the toolbar button, and the original file
opens for access to its macro. How can I save it so that when Excel is
reopened, it is available to any spreadsheet.
Also, when attempting to setup the toolbar in Outlook, after clicking the
button respectively, I received this error message dialog box: Run-time
error '424': Object required. What can I do to correct this?
Lastly, in all Office applications, if I had selected text that contained
two different font sixes, I either received an error message or the macro
didn't function correctly? Any ideas to revise my macro code above?
Thanks for any help with these issues.
Kevin