There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Tag Cloud
access acer asus bios bsod computer crash drive driver drivers error ethernet excel freeze games gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard netgear network printer problem ram random registry router slow software sound trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless xbox
Search
Search for:
Tech Support Guy Forums > Software & Hardware > All Other Software >
Applying macros over a large number of word documents

Reply  
Thread Tools
Mayaman's Avatar
Junior Member with 1 posts.
 
Join Date: Jul 2009
Experience: a bit rusty
23-Jul-2009, 11:19 AM #1
Smile Applying macros over a large number of word documents
Hi

I am working at a large charity organisation wiht many computer illterate people. What has happned is that many shared files are saved all over the place and are therefore easy to find.

I recorded a simple macro with toolbar button to put the path and filename in the footer. Easy. However, I have to do this for 60 staff members profiles. A little tedious but not a great problem.

What is a problem is suing th emacro in the existing files. I oculd open them apply the macro save and close but that would take forever. What I would like to do is find a way to apply the macro on existing doucments in one foul swoop without opening them all. Is this possible and if so could somebody please help to show me what code to use and where to put it to resolve this:

Sub Footer()
'
' Footer Macro
' Macro recorded 7/23/2009 by keithaisthorpe
'
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
End If
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
NormalTemplate.AutoTextEntries("Filename and path").Insert Where:= _
Selection.Range, RichText:=True
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub


Thanks

Keith
Reply

Tags
macros, word

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:00 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.