Font Size macro toolbar buttons... 
Author Message
 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



Mon, 24 May 2004 01:02:55 GMT  
 Font Size macro toolbar buttons...
Kevin, I'm sure someone will be able to help with the
other apps, but I'd just like to check: you do know that
in Word you won't need any such macro: CTRL+[ (open square
brace) shrinks font by one point, and CTRL+] grows it by
one point (works in Word with mixed-size selection and in
Outlook with single-size selection, doesn't seem to work
in Excel or Ppt - at least in the 97 versions I use)...

dtw

Quote:
>-----Original Message-----
>Using Office 2000, I have written the following two

macros:  DecreaseFont()
Quote:
>and IncreaseFont() that when applied to a toolbar button
in any Office
>application, it (should) decrease or increase the

selected text's font size
Quote:
>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
Quote:
>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

- Show quoted text -

Quote:
>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

- Show quoted text -

Quote:
>didn't function correctly?  Any ideas to revise my macro
code above?

>Thanks for any help with these issues.

>Kevin

>.



Tue, 25 May 2004 00:32:31 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Font Size macro toolbar buttons...

2. Windows Display Font Sizes Vs. Application Font Sizes

3. Printing a Bitmap with a specific font size On print Font size incorrect

4. Change size, font, and font size of input boxes

5. Changing Font Size in a Toolbar

6. controlling font size on toolbars

7. Toolbar font size

8. Change toolbar font size?

9. Word macro containing a change of font size

10. controling font size in footer macro

11. Macro to change text, also changes font size.

12. Font Color Toolbar Button

 

 
Powered by phpBB® Forum Software