How to insert a Macro into Word 2010 in Windows 7 & Assign Shortcut

dell3

New member
Local time
4:04 AM
Messages
9
How to insert a Macro into Word 2010 in Windows 7 & Assign Shortcut

I cannot find up to date, step by step instructions on creating a macro in Word 2010 on Windows 7.
While in Word, View, I see Create Macros.
And I can name it and paste in this info below.

Sub PrintCurrentPage()
Application.PrintOut Range:=wdPrintCurrentPage
End Sub

But how do I assign a keyboard short cut to it? Is there a youtube video that is up to date on this?
Thanks.
 

My Computer My Computer

At a glance

windows 7 professional 64 bit
OS
windows 7 professional 64 bit
Hi and welcome to Seven Forums,

The best way to do this would be to record a macro and in the dialog box that comes up, create a keyboard shortcut. Then record something, it can be anything. Then open the macro dialog box with all the macros listed, click your newly created macro and click edit. Then delete the code and replace it with your own. Save and test it.

Hope this helps
Stephen
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bit (O.E.M)Intel Core i7 2630QM @2.00GHz6GB DDR3Intel Intergrated Graphics 3000, nVidia GT525...
Computer Manufacturer/Model Number
Dell XPS 15 L502x
OS
Windows 7 Home Premium 64bit (O.E.M)
CPU
Intel Core i7 2630QM @2.00GHz
Memory
6GB DDR3
Graphics Card(s)
Intel Intergrated Graphics 3000, nVidia GT525M (1GB)
Screen Resolution
1366x768
Hard Drives
750GB Seagate 7200rpm
Keyboard
Backlit Dell XPS 15 L502x Keyboard
Mouse
Microsoft Wireless Mobile Mouse 4000
Internet Speed
2.5 Mb/s down, 0.36 up

My Computer My Computer

At a glance

Windows 7 Ultimate SP1 64-BitIntel Core i7 870 @ 2.93GHz8Gb Dual-Channel DDR3 @ 664MHznVidia GeForce GTX 460 1024MB dedicated RAM
Computer Manufacturer/Model Number
HP Pavilion Elite 495UK
OS
Windows 7 Ultimate SP1 64-Bit
CPU
Intel Core i7 870 @ 2.93GHz
Motherboard
MSI 2A9C (CPU1)
Memory
8Gb Dual-Channel DDR3 @ 664MHz
Graphics Card(s)
nVidia GeForce GTX 460 1024MB dedicated RAM
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP2310i
Screen Resolution
1920 x 1080
Hard Drives
1x1954GB Hitachi HDS22020ALA 330 (RAID), 1x1954GB Hitachi External for backup and storage
PSU
460W
Case
HP Elite
Cooling
Air cooled
Keyboard
Logitech K750 solar-powered keyboard
Mouse
Logitech Wireless M180 mouse
Internet Speed
2Mb
Other Info
Pure Avanti Flow Internet Radio with iPod Dock, 64Gb iPod, HP USB Speakers, Sony MDR-V500 Headphones, Sony Vaio F-Series Laptop

My Computer My Computer

At a glance

Windows 7 Home Premium 64bit (O.E.M)Intel Core i7 2630QM @2.00GHz6GB DDR3Intel Intergrated Graphics 3000, nVidia GT525...
Computer Manufacturer/Model Number
Dell XPS 15 L502x
OS
Windows 7 Home Premium 64bit (O.E.M)
CPU
Intel Core i7 2630QM @2.00GHz
Memory
6GB DDR3
Graphics Card(s)
Intel Intergrated Graphics 3000, nVidia GT525M (1GB)
Screen Resolution
1366x768
Hard Drives
750GB Seagate 7200rpm
Keyboard
Backlit Dell XPS 15 L502x Keyboard
Mouse
Microsoft Wireless Mobile Mouse 4000
Internet Speed
2.5 Mb/s down, 0.36 up
This is weird. I have viewed the tutorials and still can't figure it out. I have a working macro. But I am stuck on the attached screenshot. I cannot get to a place where I can assign keyboard strokes to the macro. Please help. thanks in advance.
 

Attachments

  • macro problem.png
    macro problem.png
    30.8 KB · Views: 47

My Computer My Computer

At a glance

windows 7 professional 64 bit
OS
windows 7 professional 64 bit
I agree with Tekno that the easiest way when creating a new macro is to record a macro and assign a keyboard shortcut then. If you wish to change the assigned shortcut or add one to a existing macro then you can click

File > Options > Customize Ribbon and at the bottom of the window click Keyboard Shortcuts: Customize.

Under Categories scroll to the bottom and you should find Macros. If you can't find your particular macro check what document it's saved in under the drop down box "Save changes in:".

It would make more sense to have this option in the Macros window but that's MS for you.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64Intel Pentium Dual Core E5200 2.5GHz (3.77GHz...Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)Palit GeForce GTS 250 (1024MB)
Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
This is weird. I have viewed the tutorials and still can't figure it out. I have a working macro. But I am stuck on the attached screenshot. I cannot get to a place where I can assign keyboard strokes to the macro. Please help. thanks in advance.

Did you assign a keyboard shortcut when you recorded the macro, as you should have done?

The macro has obviously been recorded because it has a name and a list of options e.g. if you click on Run, it will run the macro.
 

My Computer My Computer

At a glance

Windows 7 Ultimate SP1 64-BitIntel Core i7 870 @ 2.93GHz8Gb Dual-Channel DDR3 @ 664MHznVidia GeForce GTX 460 1024MB dedicated RAM
Computer Manufacturer/Model Number
HP Pavilion Elite 495UK
OS
Windows 7 Ultimate SP1 64-Bit
CPU
Intel Core i7 870 @ 2.93GHz
Motherboard
MSI 2A9C (CPU1)
Memory
8Gb Dual-Channel DDR3 @ 664MHz
Graphics Card(s)
nVidia GeForce GTX 460 1024MB dedicated RAM
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP2310i
Screen Resolution
1920 x 1080
Hard Drives
1x1954GB Hitachi HDS22020ALA 330 (RAID), 1x1954GB Hitachi External for backup and storage
PSU
460W
Case
HP Elite
Cooling
Air cooled
Keyboard
Logitech K750 solar-powered keyboard
Mouse
Logitech Wireless M180 mouse
Internet Speed
2Mb
Other Info
Pure Avanti Flow Internet Radio with iPod Dock, 64Gb iPod, HP USB Speakers, Sony MDR-V500 Headphones, Sony Vaio F-Series Laptop
Hi,

Created a video myself to show you how to do this as I couldn't find a good one. Hope it helps. You'll want to watch it in HD as the quality isn't very good

Stephen

EIDT - REMOVED THE VIDEO FROM YOUTUBE. SORRY. YOU'LL JUST HAVE TO MANAGE WITH THE WRITTEN STEPS.
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bit (O.E.M)Intel Core i7 2630QM @2.00GHz6GB DDR3Intel Intergrated Graphics 3000, nVidia GT525...
Computer Manufacturer/Model Number
Dell XPS 15 L502x
OS
Windows 7 Home Premium 64bit (O.E.M)
CPU
Intel Core i7 2630QM @2.00GHz
Memory
6GB DDR3
Graphics Card(s)
Intel Intergrated Graphics 3000, nVidia GT525M (1GB)
Screen Resolution
1366x768
Hard Drives
750GB Seagate 7200rpm
Keyboard
Backlit Dell XPS 15 L502x Keyboard
Mouse
Microsoft Wireless Mobile Mouse 4000
Internet Speed
2.5 Mb/s down, 0.36 up
File > Options > Customize Ribbon and at the bottom of the window click Keyboard Shortcuts: Customize.

Duzzy and everyone, thank you! That gets me to the right place. Had no idea it would be there, instead of under the Macros icon. Which brings me to a follow up question: What are the best keyboard shortcuts, stroke combinations, to assign to Word 2010 macros? I tried to look up a list of unused keystroke combinations but have not found such a list. And, I can't get a simple list to show up on my screen. I seem to have to click through thousands of options to see what keystrokes are being used. What is some combination that is definitely not being used in Windows 7 or Word 2010? Do they all have to being with Control? Thanks again.
 

My Computer My Computer

At a glance

windows 7 professional 64 bit
OS
windows 7 professional 64 bit
You may find it easier to use the button option rather than a keyboard shortcut.

There's no time penalty, because all you'll do is click a button on the ribbon instead of pressing a keyboard shortcut.
 

My Computer My Computer

At a glance

Windows 7 Ultimate SP1 64-BitIntel Core i7 870 @ 2.93GHz8Gb Dual-Channel DDR3 @ 664MHznVidia GeForce GTX 460 1024MB dedicated RAM
Computer Manufacturer/Model Number
HP Pavilion Elite 495UK
OS
Windows 7 Ultimate SP1 64-Bit
CPU
Intel Core i7 870 @ 2.93GHz
Motherboard
MSI 2A9C (CPU1)
Memory
8Gb Dual-Channel DDR3 @ 664MHz
Graphics Card(s)
nVidia GeForce GTX 460 1024MB dedicated RAM
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP2310i
Screen Resolution
1920 x 1080
Hard Drives
1x1954GB Hitachi HDS22020ALA 330 (RAID), 1x1954GB Hitachi External for backup and storage
PSU
460W
Case
HP Elite
Cooling
Air cooled
Keyboard
Logitech K750 solar-powered keyboard
Mouse
Logitech Wireless M180 mouse
Internet Speed
2Mb
Other Info
Pure Avanti Flow Internet Radio with iPod Dock, 64Gb iPod, HP USB Speakers, Sony MDR-V500 Headphones, Sony Vaio F-Series Laptop
I know when you assign a shortcut under "Keyboard Shortcuts: Customize" or when you record a macro that if the shortcut is already assigned to another function in Word it will tell you under the Current Keys list box.

As for W7 shortcuts you can find a few lists on Google but not all would be complete. I do believe though when Word is the focused app and a shortcut is assigned to both Word and W7 then Word will be given priority.

EDIT: You can use a combination of CTRL, SHIFT or ALT. eg. CTRL+M or CTRL+ALT+X or ALT+SHIFT+J or CTRL+SHIFT+ALT+X etc....

Buttons are also a good option.
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Ultimate x64Intel Pentium Dual Core E5200 2.5GHz (3.77GHz...Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)Palit GeForce GTS 250 (1024MB)
Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
Back
Top