Transcript
  • 8/20/2019 microsoft's Macro Tutorial

    1/12

    Hi

    First of all start your Microsoft oce word processor and follow the following steps:

    1. You need to make sure the developer tab is displayed

    •  he initial page is like this

    !. go to the ribbon and click it

    ". click on word options

  • 8/20/2019 microsoft's Macro Tutorial

    2/12

    #ord options button

    $. the following windows appears% check the &show developer tab' that is under

    popular and click ok

    (opular tab show developer tab option )check this one*

    +click on the developer tab option that now appears on the menu bar

  • 8/20/2019 microsoft's Macro Tutorial

    3/12

    +click on record macro button

    ,eveloper tab record macro button

    -. the following screen appears % click on button so that the macro should

    appear as a uick button on the access uick toolbar

    /. the following screen appears now click on the macro name you are creating

    and then click add0: do not click or add the &separator'

    utton

  • 8/20/2019 microsoft's Macro Tutorial

    4/12

    2. now you can start performing the actions you want your macro to do for e.g

    we will create a macro that will do the following:

    • create a new document

    • change the font and font si3e

    • insert a date

    1. click the ribbon and click on new then click on blank document and then

    press create

    !. note a new window document appears.

    4lick ok

    5ddbutton

     Your

    macro

  • 8/20/2019 microsoft's Macro Tutorial

    5/12

    ". type some te6t and change the font and font si3e to a desired one

    $. insert date : click on insert tab and go to date and time

    Font

    Font

  • 8/20/2019 microsoft's Macro Tutorial

    6/12

    -. 5 date and time window appears 4hose a desired date format and then

    click ok 

    /. he date is inserted in the document

    ,ate and

    time button

    ok button

  • 8/20/2019 microsoft's Macro Tutorial

    7/12

     

    2. 0ow that we have done all that we want our macro to be doing % we need

    to stop recording our macro. 7o to the developers tab and click on stop

    recording

    8top recording button

  • 8/20/2019 microsoft's Macro Tutorial

    8/12

    9. 0ow click on that macro button you ust created under the uick access

    toolbar

    ;. #hat happens< =n some programs this will work perfectly >ne but in

    some this may not be the case :

    •  Your macro will display everything you recorded in the current

    document

    • 5fter you close every other document% try opening the word

    processor again and try running your macro again .one of thesethree happens1. Your macro will run correctly!. Your micro might also produce this error

    & the reuested member of the collection does not e6ist' his happens because in the code of your macro a certain line

    tells the macro to only apply the changes that the macro

    recorded in the document it was recorded thus if you recorded

    your macro whilst the document name was &document!' the

    macro will not run correctly in other documents.

    What you need to do 4lick on the debug button

    ?uick access

    toolbar

     Your macro

    button

  • 8/20/2019 microsoft's Macro Tutorial

    9/12

     he following screen appears

     You will notice a line highlighted in yellow

    ,elete that line and the above line that says

    &windows )document !*:activate'

     he code should at least look like this

    ,ebu button

  • 8/20/2019 microsoft's Macro Tutorial

    10/12

    4lose the debugging window

  • 8/20/2019 microsoft's Macro Tutorial

    11/12

    0ow run your micro again. =t should work perfectly >ne

    now .

  • 8/20/2019 microsoft's Macro Tutorial

    12/12

    =f you have any uestions or clari>cations you know what to do .

    yeee