Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Store the macros in an add-in in your Startup folder.
-- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "a.e.neuman" wrote in message news ![]() Hello experts, I have two macros that I want to be available at all times (and secondly for all users - or easlily portable to users). These macros instruct Word to show the document's FULL PATH in Word's title bar - VERY useful indeed (I'll show the macros below). The macros run automatically when a document is opened and/or saved. Several times now Normal.dot has become corrupt and had to be replaced - and we lost these macros and had to re-create them and they seem to go into Normal.dot. How can we make these macros available at all times (and secondly for all users) and have them reside outside of Normal.dot? Here are the macros; ------------------------------------------------ Sub AutoOpen() ' ' Macro added ' ActiveWindow.Caption = ActiveDocument.FullName End Sub Sub FileSaveAs() ' ' Macro added ' Dim pRange As Word.Range Dim oFld As Field On Error GoTo Handler Retry: With Dialogs(wdDialogFileSaveAs) If .Show = 0 Then Exit Sub End With System.Cursor = wdCursorNormal ActiveWindow.Caption = ActiveDocument.FullName For Each pRange In ActiveDocument.StoryRanges Do For Each oFld In pRange.Fields If oFld.Type = wdFieldFileName Then oFld.Update End If Next oFld Set pRange = pRange.NextStoryRange Loop Until pRange Is Nothing Next ActiveDocument.Save Exit Sub Handler: If Err.Number = 5155 Or Err.Number = 5153 Then MsgBox Err.Decription, vbOKOnly Resume Retry End If End Sub ---------------------------------------------------------- Thank you in advance for help/tricks/pointers |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy macros to a new normal.dot? | Microsoft Word Help | |||
Normal.dot with macros | Microsoft Word Help | |||
How do I make Arial rather than Times Roman the font? | New Users | |||
how do you make a macro execute x number of times? | Microsoft Word Help | |||
Macros in Normal.dot | Microsoft Word Help |