Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Word Macros?

  1. #1
    New Coder
    Join Date
    Apr 2004
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word Macros?

    I'm trying to create a Macro that does the headers of my documents... what i want it to do is.. basically just name, date, and (class/teacher)
    Basic Structure of the Macro

    (Justify accordingly)

    INSERT:

    - The name is always the same.. so that part should be easy..
    - Now the date.. is there a way of making a macro that would look at the current date at that time and insert it in a certain format?..
    -Then maybe it could try to insert the teachers/class name.. but this would need to be done by me.. i know this is lazy but is there a way of having the macro prompt me for w/e I want to insert for this "field"?
    - Afterwards.. move on and do something else?

    Thanks

  • #2
    New Coder
    Join Date
    Apr 2004
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    anyone?

  • #3
    New Coder
    Join Date
    Jan 2005
    Location
    West Midlands, United Kingdom
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool This help you

    Right then, i don't usually do this for people but today i'll make an exception.

    Now you can record a macro which sorts the insert date into a header as normal.

    Just go to record macro, while it's recording go view Header's and Footers, then while you're in the header go to insert and click date. Follow choose what date format you want. You should be able to record typing in that name if it stays the same. Then click stop

    now the fun part..

    You can sort the text prompt out for the teacher name, by adding this to the macro using the VB editor.


    teach_name = InputBox("Enter Name here")
    Selection.TypeText (" " + teach_name)

    The first line is just the box you get to input the name. The second line puts spaces in and then the name.

    If you want to read up more just hit this place:

    MSDN

    That should sort you out,

    Al.
    Last edited by mr_Al; 02-08-2005 at 10:46 AM. Reason: forgot to sign it :o


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •