Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How do I add a macro to a document?
I want to add a macro:
Sub AutoOpen () Selection.Find.Execute Find Text:=MonmthNam End Sub What I wan this macro to DO is open my calendar on the current month, rather than on January esch time. Purpose: to save scrolling down to every month (except January) as the year progresses. Can you help me? |
#2
|
|||
|
|||
Open your document. Hit Alt+F11 or Tools--Macro--Visual Basic Editor
(VBE). On the top-left, double-click ThisDocument under your document's name. Type the following, instead of your code: Private Sub Document_Open () Selection.Find.Execute Find Text:=MonmthNam End Sub Hit the SAVE diskette on the toolbar. Close the VBE. ******************* ~Anne Troy www.OfficeArticles.com "Bobby" wrote in message ... I want to add a macro: Sub AutoOpen () Selection.Find.Execute Find Text:=MonmthNam End Sub What I wan this macro to DO is open my calendar on the current month, rather than on January esch time. Purpose: to save scrolling down to every month (except January) as the year progresses. Can you help me? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro preventing document to be opened | Microsoft Word Help | |||
Running a macro on a protected document. | Microsoft Word Help | |||
mail merge with attachments | Mailmerge | |||
How to assign a macro to a shape in a word document? | Microsoft Word Help | |||
2000 to 2002 macro and "Could not open macro storage" | Mailmerge |