Kev nkag siab Macros hauv Microsoft Word

Cov txheej txheem:

Kev nkag siab Macros hauv Microsoft Word
Kev nkag siab Macros hauv Microsoft Word
Anonim

Ib macro yog cov lus txib uas tau sau tseg kom nws tuaj yeem rov ua si (ua tiav) tom qab lub sijhawm. Macros yog qhov zoo rau kev txo cov haujlwm uas koj yuav tsum tau ua ntawm cov kauj ruam uas koj ua tsis tu ncua. Nov yog yuav ua li cas los tsim thiab sim macro hauv Microsoft Word.

Cov lus qhia hauv kab lus no siv rau Word rau Microsoft 365, Word 2019, Word 2016, Word 2013, thiab Lo Lus 2010.

Vim li cas siv Macro

Nrog macro, koj tuaj yeem tau txais cov txiaj ntsig zoo ib yam los ntawm kev nyem qhov hais kom ua es tsis txhob mus dhau txhua kauj ruam. Qee txoj hauv kev siv macros los ua kom koj cov khoom tsim tau muaj xws li:

  • Ntxig koj lub tuam txhab logo thiab lub npe rau hauv ib hom ntawv tshwj xeeb.
  • Ntxig lub rooj uas koj yuav tsum tau tsim tsis tu ncua.
  • Formate ib daim ntawv nrog tej yam ntxwv, xws li nplooj ntawv naj npawb thiab ob-spaced paragraphs.

Tsim thiab siv macro yog kev kawm txuj ci tab sis qhov ua tau zoo yog qhov tsim nyog rau kev siv zog.

Create a Macro

Muaj ntau dua 950 cov lus txib hauv Lo Lus, feem ntau ntawm cov ntawv qhia zaub mov thiab toolbars thiab muaj cov yuam sij luv rau lawv. Qee cov lus txib no, txawm li cas los xij, tsis raug xa mus rau cov ntawv qhia zaub mov lossis toolbars los ntawm lub neej ntawd. Ua ntej koj tsim koj tus kheej Lo Lus macro, xyuas seb nws puas muaj thiab tuaj yeem raug xa mus rau lub toolbar.

Yuav kom pom cov lus txib muaj nyob hauv Lo Lus, ua raws cov kauj ruam no:

  1. Select the View tab.

    Image
    Image
  2. Choose Macros.

    Image
    Image
  3. Select View Macros.

    Or, nias lub Alt+F8 tus yuam sij kom nkag mus rau Macros dialog box.

    Image
    Image
  4. Xaiv tus Macros hauv poob xub thiab xaiv Word Commands.

    Image
    Image
  5. Nyob rau hauv cov tsiaj ntawv cov npe ntawm cov npe hais kom ua, taw qhia lub npe los tso saib cov lus piav qhia ntawm cov lus txib hauv qab ntawm Macros dialog box hauv qab Descriptiontag.

    Image
    Image

Yog hais tias koj xav tsim muaj, tsis txhob muab luam tawm nrog koj tus kheej lo lus macro. Yog tias nws tsis muaj, pib tsim koj Lo Lus macro.

Plan for Effective Word Macros

Cov kauj ruam tseem ceeb tshaj plaws hauv kev tsim Lo Lus macro zoo yog kev npaj ua tib zoo. Qhov kev npaj no suav nrog kev muaj lub tswv yim meej txog qhov koj xav kom Lo Lus macro ua, nws yuav ua rau koj txoj haujlwm yav tom ntej yooj yim dua, thiab cov xwm txheej uas koj xav siv nws.

Thaum koj muaj cov no hauv siab, npaj cov kauj ruam tiag tiag. Qhov no yog ib qho tseem ceeb vim hais tias tus recorder yuav nco ntsoov txhua yam koj ua thiab suav nrog hauv macro. Piv txwv li, yog tias koj ntaus ib yam dab tsi thiab tom qab ntawd rho tawm, txhua zaus koj khiav qhov macro, Lo lus yuav ua tib yam nkag thiab tom qab ntawd rho tawm, ua qhov tsis txaus ntseeg thiab tsis muaj txiaj ntsig macro.

Thaum koj npaj koj cov macro, ntawm no yog qee yam yuav tsum xav txog:

  • Plan cov lus txib thiab qhov kev txiav txim uas koj xav kom macro ua cov lus txib.
  • Paub cov yuam sij luv rau cov lus txib uas koj npaj yuav siv. Qhov no yog qhov tseem ceeb tshwj xeeb rau kev taw qhia vim tias koj tsis tuaj yeem siv tus nas rau navigation hauv cheeb tsam cov ntaub ntawv thaum koj khiav lub recorder. Tsis tas li ntawd, koj yuav tsim lub macro leaner yog tias koj siv tus yuam sij shortcut es tsis yog tus xub yuam sij.
  • Npaj rau cov lus uas Lo Lus yuav tso tawm thiab qhov ntawd yuav tso tseg qhov macro.
  • Siv ob peb kauj ruam li sai tau kom cov macro npaum.
  • Ua yam tsawg kawg ib qho kev sim ua ntej koj pib sau.

Tom qab koj tau npaj koj Lo Lus macro thiab ua tiav, koj npaj tau sau nws. Yog tias koj tau npaj koj qhov macro kom zoo, sau nws rau kev siv tom qab yuav yog qhov yooj yim tshaj plaws ntawm cov txheej txheem. Qhov sib txawv ntawm kev tsim cov macro thiab ua haujlwm ntawm cov ntaub ntawv yog tias koj yuav tsum nias ob peb lub khawm ntxiv thiab ua ob peb xaiv hauv cov thawv sib tham.

Record the Macro

Thaum koj pib sau cov macro, tus nas pointer muaj lub cim me me uas zoo li daim kab xev cassette ib sab ntawm nws, qhia tias Lo Lus kaw koj qhov kev ua. Tom qab ntawd koj tuaj yeem ua raws li cov kauj ruam uas koj tau teev tseg hauv theem npaj. Thaum koj ua tiav lawm, nias lub pob Stop (nws yog xiav square ntawm sab laug). Thaum koj nias lub pob Stop, koj Lo Lus macro npaj siv.

Ntawm no yog yuav sau cov macro.

  1. Mus rau View tab, xaiv Macros, ces xaiv Record Macro qhib lub Record Macro dialog box.

    Image
    Image
  2. Nyob hauv Macro Name lub thawv ntawv, ntaus lub npe tshwj xeeb.

    Cov npe tuaj yeem muaj txog 80 tus tsiaj ntawv lossis tus lej (tsis muaj cov cim lossis qhov chaw) thiab yuav tsum pib nrog tsab ntawv. Lub npe yuav tsum yog qhov tshwj xeeb kom koj tuaj yeem txiav txim siab tias nws ua dab tsi yam tsis tas yuav xa mus rau cov lus piav qhia.

  3. Nyob hauv Description lub thawv ntawv, sau cov lus piav qhia ntawm cov kev ua uas macro ua.

    Image
    Image
  4. Xaiv seb koj xav kom cov macro muaj nyob hauv txhua cov ntaub ntawv lossis tsuas yog hauv daim ntawv tam sim no. Yog tias koj xaiv txwv qhov muaj nyob ntawm cov lus txib, taw qhia lub npe ntawm cov ntaub ntawv hauv Khoom Macro hauvcov ntawv qhia zaub mov.

    Los ntawm lub neej ntawd, Lo Lus ua rau cov macro muaj rau tag nrho koj cov ntaub ntawv, thiab tej zaum koj yuav pom tias qhov no ua rau qhov kev txiav txim siab tshaj plaws.

    Image
    Image
  5. Thaum koj tau nkag mus rau cov ntaub ntawv rau macro, xaiv OK. Cov Ntaub Ntawv Macro Toolbar tshwm nyob rau sab sauv-sab laug ntawm lub vijtsam.

    Image
    Image

Txhawm rau ncua qhov kaw, xaiv lub Pause Recording/Resume Recorder (nws yog ib qho ntawm sab xis). Txhawm rau rov pib kaw, xaiv nws dua.

Test the Macro

Lub hom phiaj tom qab tsim cov macros hauv Lo Lus yog txhawm rau ua kom koj txoj haujlwm ua kom nrawm dua los ntawm kev tso cov haujlwm rov ua dua thiab nyuaj ua ntu zus ntawm cov lus txib ntawm koj lub ntsis ntiv tes. Xyuas kom koj lub macro khiav raws li qhov xav tau los ntawm kev sim cov macro.

  1. Txhawm rau khiav macro, nias lub Alt+F8 tus yuam sij shortcut kom pom lub Macros dialog box.

    Image
    Image
  2. Highlight macro hauv daim ntawv, tom qab ntawd xaiv Run.

    Image
    Image

Yog tias koj tsis pom koj qhov macro, xyuas kom tseeb qhov chaw nyob hauv Macros hauv lub thawv.

Tsim Keyboard Shortcuts rau Macros

Yog tias koj tsim ob peb macros, tshawb nrhiav los ntawm Macros dialog box yuav siv sijhawm. Yog tias koj muab macros tus yuam sij shortcut, koj tuaj yeem hla lub dialog box thiab nkag mus rau koj cov macro ncaj qha los ntawm cov keyboard tib yam li koj siv cov yuam sij shortcut kom nkag mus rau lwm cov lus txib hauv Word.

  1. Select File, ces xaiv Options.

    Image
    Image
  2. In the Word Options dialog box, mus rau sab laug pane thiab xaiv Custom Ribbon.

    Image
    Image
  3. Xaiv Customize.

    Image
    Image
  4. Nyob rau hauv Categories daim ntawv, nqes mus rau Macros thiab xaiv cov macro uas koj xav tsim qhov shortcut tshiab.

    Yog tias lub macro tam sim no muaj tus yuam sij shortcut muab rau nws, qhov shortcut yuav tshwm nyob rau hauv lub thawv hauv qab no cov yuam sij tam sim no daim ntawv lo.

    Image
    Image
  5. Yog tsis muaj tus yuam sij shortcut tau muab rau hauv macro, lossis yog tias koj xav tsim tus yuam sij thib ob rau qhov macro, xaiv lub nias tus yuam sij tshiabntawv lub thawv.

    Image
    Image
  6. Nkag mus rau tus yuam sij shortcut koj xav siv los nkag rau koj qhov macro.

    Yog tus yuam sij shortcut raug xa mus rau ib qho kev hais kom ua, cov lus hais tias Tam sim no muab rau ua raws li lub npe ntawm cov lus txib. Ob leeg rov muab tus yuam sij shortcut los ntawm kev txuas ntxiv, lossis xaiv tus yuam sij shortcut tshiab.

  7. Xaiv qhov Txuag cov kev hloov pauv hauv poob xub thiab xaiv Nomsiv qhov hloov pauv rau txhua cov ntaub ntawv tsim hauv Lo Lus.

    Yuav siv tus yuam sij shortcut nkaus rau hauv daim ntawv tam sim no, xaiv cov ntaub ntawv npe ntawm daim ntawv.

    Image
    Image
  8. Xaiv Assign.

    Image
    Image
  9. Xaiv Kaw txhawm rau txuag koj cov kev hloov pauv.

    Image
    Image

Pom zoo: