Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / General MS Word Questions / July 2005

Tip: Looking for answers? Try searching our database.

How do I add a macro to a document?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bobby - 30 Jul 2005 16:55 GMT
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?
Anne Troy - 30 Jul 2005 17:21 GMT
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

> I want to add a macro:
>
[quoted text clipped - 7 lines]
>
> Can you help me?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.