by andrew noske my powerpoint macros

11
by Andrew Noske http://www.andrewnoske.com/ My PowerPoint Macros

Upload: cornelia-palmer

Post on 23-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: By Andrew Noske  My PowerPoint Macros

by Andrew Noske

http://www.andrewnoske.com/

My PowerPoint Macros

Page 2: By Andrew Noske  My PowerPoint Macros

• Introduction• Running Macros• Using these Macros in another PowerPoint document• Problems Running Macros• Using Macros across PowerPoint documents• Attaching/copying Macros in another PowerPoint Doc• Editing Macros• Signing Macros• Final Words

Contents

Page 3: By Andrew Noske  My PowerPoint Macros

• This PowerPoint has several useful Macros attached to it.

• To access these Macros click:– Tools >> Marco >> Marcos [Alt+F8] (on the toolbar)

– From here you can run, edit, create & delete Macros.

– TIP: get use to pressing [Alt+F8]

Introduction

Page 4: By Andrew Noske  My PowerPoint Macros

• To run Macros:– If not already hit [Alt+F8]– Click the macro you want and

hit “Run”– WARNING: Generally speaking

you cannot undo macros (especially in MS Excel) and so it’s a good idea to save a backup before you run a new/unfamiliar Macro.

Running Macros

Page 5: By Andrew Noske  My PowerPoint Macros

• Instructions:– Make sure this PPT

document is open– Open/create your own PPT

document.– Hit [Alt-F8] in your PPT

document, and clickMacro in: “All open presentations”

– Select the one you want, hit “Run”

Using these Macros in another PowerPoint document

Page 6: By Andrew Noske  My PowerPoint Macros

• Sometimes you may find you can’t run Macros. This is to do with security settings, and a can be awkward to get around too.

• Easiest way around this is go:– Tools >> Macros >> Security … >>

Security Level, change the setting to “Medium” and click OK.

– Close and reopen PowerPoint before it takes effect.

• A better method is to use/install certificates you do this under “Trusted Publishers” tab to create you OWN certificate is harder – you can read about it on the “Signing Macros” slide, or try Google.

Problems Running Macros Disabled!

Page 7: By Andrew Noske  My PowerPoint Macros

• Unlike MS Excel & MS Word, where you have a place to store/share Macros across ALL document, you cannot do the same in PowerPoint.

• I recommend writing all your Macros in a single PPT file (like this one)… and open this PPT whenever you wish to run Macros in another PPT.

• However, if you DO want to ATTACH the Macros code to a different document do the following (next slide)…

Using Macros across PowerPoint documents

Page 8: By Andrew Noske  My PowerPoint Macros

• Instructions:– Make sure this PPT document is open

– Open/create your own PPT document.

– Hit [Alt-F8] in your PPT document, type Marco name: “whatever” in and hit “Create”

– The Visual Basic editor will appear.

– In the Visual Basic editor, navigate to “PowerPoint_Macros_AN”, select all [Ctrl+A] the code and copy it [Ctrl+C].

– Navigate back to your new “Module1” select all [Ctrl+A] and replace your “whatever …” subroutine with my code.

– You can now close the Visual Basic Editor (it will save automatically) and then close this PPT document.

Attaching/copying Macros in another PowerPoint Doc

Navigate

Paste/edit code here

Page 9: By Andrew Noske  My PowerPoint Macros

• To edit Macros:– Click the macro and hit

“Edit”– Use the Visual Basic

(VB) window to edit code.

– TIP: Before youplay around read theinstructions at thetop of my code.

– Once done, you cansave changes, run the subroutine you are editing or just close the VB window (it will saveautomatically)

Editing Macros

RunSave

Page 10: By Andrew Noske  My PowerPoint Macros

• If you keep getting warning about Macros you can try using a digital signature.

• STEPS:1. Go: Start >> Programs >> Microsoft Office >> Tools >> "Digital

Certificate for VBA Projects”• This runs a program called “SelfCert.exe”

(which lives in: C:\Program Files\Microsoft Office\OFFICE11\Cert.exe)2. For certificate name type something like “MyCertificate”. Click OK.

• You have just created your first “digital certificate”, and you can use this to sign VBA Projects.

3. Open the VB editor window and make sure the module/file you want to sign is open/selected.

• To get to here you can shortcut click [Alt+F11] from PowerPoint.4. Click: Tools >> Digital Signatures >> Choose. Select the certificate

you just created. OK your way out and save your file.

• The next time you open this particular file you shouldn’t get any warnings.

Signing Macros

Page 11: By Andrew Noske  My PowerPoint Macros

• Visual Basic is a babyish language, but hey – Macros are cool! Macros can save you lots of time doing by automating repetitive tasks.

• Macro implementation in PowerPoint is not so bad, but actually I can’t think of THAT many tasks you wound want to automate in PowerPoint, so their use here is limited.

• Learning to use Macros in Excel and Word is much more valuable – if you wish to learn Macros start with those!

• Visit http://www.andrewnoske.com/ for more cool stuff.

Final Words