View Single Post
Old 04-27-2012, 04:54 AM   #1
DSpider
Evangelist
DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.
 
DSpider's Avatar
 
Posts: 414
Karma: 326969
Join Date: Nov 2009
Location: Romania
Device: iPod touch 2G (16 GB)
Is there a Word macro that can change font spacing in increments?

I'm looking for a Word macro that can change it in 0.05 increments, and nothing else. Just the font spacing. I use Word 2010 but older macros seem to work too (it's still Visual Basic). Right now all I have is:

Code:
Sub Macro1()
'
' Macro1 Macro
'
'
    With Selection.Font
        .Spacing = 0.05
    End With
End Sub
Which is fine, I guess. Except I need a bunch more, each one mapped to the Alt + 1-9 keys and 0 being the "Normal" value. Isn't there a better way? Couldn't I do this with just 3 macros? One for increasing, one for decreasing and one for 0.


Edit: ".Value = .Value + 1"

I got it. Now the macros look like this:

Code:
Sub SpacingDecrease()
    With Selection.Font
        .Spacing = .Spacing - 0.05
    End With
End Sub

Sub SpacingIncrease()
    With Selection.Font
        .Spacing = .Spacing + 0.05
    End With
End Sub

Sub SpacingNormal()
    With Selection.Font
        .Spacing = 0
    End With
End Sub
I set them on "Alt+,", "Alt+." and "Alt+/" for which I use AltGr (the right Alt).

Last edited by DSpider; 04-28-2012 at 10:11 AM.
DSpider is offline   Reply With Quote