Insert page number in one click

M

mbefl2

OK, I admit it: I'm lazy. I'm finding it very annoying in Word 2007 that I
have to click three different times to insert a page number at the current
location in my header (Page number, Current position, Plain number). Is there
any way I can create a shortcut or macro to just skip right to Plain Number
and have the page number inserted right there? Thanks!
 
G

Graham Mayor

Add the following macro to a QAT button or keyboard shortcut to insert the
page number at the cursor

Sub InsPageNo()
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage, _
PreserveFormatting:=False
ActiveWindow.View.ShowFieldCodes = False
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

Stefan Blom

It's even quicker to use the built-in shortcut: Alt+Shift+P (assigned to the
InsertPageField command).
 
G

Graham Mayor

Hmmm. That brings up Media Player for me? But if it works - it is certainly
simpler than a macro ;)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

Suzanne S. Barnhill

Works here. There's *something* that starts Media Player, though, because
I've done it inadvertently.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
S

Stefan Blom

And even if it didn't work, assigning a different shortcut to the
InsertPageField command would be a simple task, of course. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top