1<?xml version="1.0" encoding="UTF-8"?> 2 3 4 5<!--*********************************************************** 6 * 7 * Licensed to the Apache Software Foundation (ASF) under one 8 * or more contributor license agreements. See the NOTICE file 9 * distributed with this work for additional information 10 * regarding copyright ownership. The ASF licenses this file 11 * to you under the Apache License, Version 2.0 (the 12 * "License"); you may not use this file except in compliance 13 * with the License. You may obtain a copy of the License at 14 * 15 * http://www.apache.org/licenses/LICENSE-2.0 16 * 17 * Unless required by applicable law or agreed to in writing, 18 * software distributed under the License is distributed on an 19 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 20 * KIND, either express or implied. See the License for the 21 * specific language governing permissions and limitations 22 * under the License. 23 * 24 ***********************************************************--> 25 26 27 28 29 <helpdocument version="1.0"> 30<meta> 31<topic id="textsharedguidemacro_recordingxml" indexer="include" status="PUBLISH"> 32<title id="tit" xml-lang="en-US">Recording a Macro</title> 33<filename>/text/shared/guide/macro_recording.xhp</filename> 34</topic> 35</meta> 36<body> 37<bookmark xml-lang="en-US" branch="index" id="bm_id3093440"><bookmark_value>macros; recording</bookmark_value> 38<bookmark_value>recording; macros</bookmark_value> 39<bookmark_value>Basic; recording macros</bookmark_value> 40</bookmark> 41<paragraph role="heading" id="hd_id3093440" xml-lang="en-US" level="1" l10n="U" oldref="1"><variable id="macro_recording"><link href="text/shared/guide/macro_recording.xhp" name="Recording a Macro">Recording a Macro</link> 42</variable></paragraph> 43<switch select="appl"> 44<case select="WRITER"><section id="macrorecorder"> 45<list type="ordered"> 46<listitem> 47<paragraph role="listitem" id="par_id3154749" xml-lang="en-US" l10n="U" oldref="4">Open the document for which you want to record a macro.</paragraph> 48</listitem> 49<listitem> 50<paragraph role="listitem" id="par_id3149398" xml-lang="en-US" l10n="CHG" oldref="5">Choose <emph>Tools - Macros - Record Macro</emph>.</paragraph> 51<paragraph role="listitem" id="par_id3150275" xml-lang="en-US" l10n="U" oldref="6">You see the small <emph>Recording</emph> dialog with just one button called <emph>Stop Recording</emph>.</paragraph> 52</listitem> 53<listitem> 54<paragraph role="listitem" id="par_id3153087" xml-lang="en-US" l10n="U" oldref="7">Perform the actions you want to be recorded in the document.</paragraph> 55<paragraph role="listitem" id="par_id3150504" xml-lang="en-US" l10n="U" oldref="15">Press the Escape key to deselect an object, as the macro recorder currently does not record this action by mouse click.</paragraph> 56</listitem> 57<listitem> 58<paragraph role="listitem" id="par_id3148492" xml-lang="en-US" l10n="U" oldref="8">Click <emph>Stop Recording</emph>.</paragraph> 59<paragraph role="listitem" id="par_id3148686" xml-lang="en-US" l10n="U" oldref="9">The <emph>Macro</emph> dialog appears, in which you can save and run the macro.</paragraph> 60<paragraph role="listitem" id="par_id3159158" xml-lang="en-US" l10n="U" oldref="10">If you want to abort the recording without saving a macro, click the <emph>Close</emph> button of the <emph>Recording</emph> dialog.</paragraph> 61</listitem> 62<listitem> 63<paragraph role="listitem" id="par_id3144510" xml-lang="en-US" l10n="U" oldref="11">To save the macro, first select the object where you want the macro to be saved in the <emph>Save macro in</emph> list box.</paragraph> 64</listitem> 65<listitem> 66<paragraph role="listitem" id="par_id3148550" xml-lang="en-US" l10n="U" oldref="12">If you want the macro to be saved into a new library or module, click the <emph>New Library </emph>or <emph>New Module </emph>button and enter a name for the library or module.</paragraph> 67</listitem> 68<listitem> 69<paragraph role="listitem" id="par_id3149456" xml-lang="en-US" l10n="CHG" oldref="13">Enter a name for the new macro in the <emph>Macro name</emph> text box. Do not use Basic keywords as a name.</paragraph> 70</listitem> 71<listitem> 72<paragraph role="listitem" id="par_id3154138" xml-lang="en-US" l10n="U" oldref="14">Click <emph>Save</emph>.</paragraph> 73</listitem> 74</list> 75<paragraph role="head2" id="hd_id2486342" xml-lang="en-US" l10n="NEW">Limitations of the macro recorder</paragraph> 76<paragraph role="paragraph" id="par_id3608508" xml-lang="en-US" l10n="NEW">The following actions are <emph>not</emph> recorded:</paragraph> 77<list type="unordered"> 78<listitem> 79<paragraph role="paragraph" id="par_id921353" xml-lang="en-US" l10n="NEW">Opening of windows is not recorded.</paragraph> 80</listitem> 81<listitem> 82<paragraph role="paragraph" id="par_id9296243" xml-lang="en-US" l10n="NEW">Actions carried out in another window than where the recorder was started are not recorded.</paragraph> 83</listitem> 84<listitem> 85<paragraph role="paragraph" id="par_id4269234" xml-lang="en-US" l10n="NEW">Window switching is not recorded.</paragraph> 86</listitem> 87<listitem> 88<paragraph role="paragraph" id="par_id8014465" xml-lang="en-US" l10n="NEW">Actions that are not related to the document contents are not recorded. For example, changes made in the Options dialog, macro organizer, customizing.</paragraph> 89</listitem> 90<listitem> 91<paragraph role="paragraph" id="par_id2814416" xml-lang="en-US" l10n="NEW">Selections are recorded only if they are done by using the keyboard (cursor traveling), but not when the mouse is used.</paragraph> 92</listitem> 93<listitem> 94<paragraph role="paragraph" id="par_id2522354" xml-lang="en-US" l10n="NEW">The macro recorder works only in Calc and Writer.</paragraph> 95</listitem> 96</list> 97<embed href="text/shared/00/00000004.xhp#related"/> 98<paragraph role="paragraph" id="par_id3156422" xml-lang="en-US" l10n="C"><link href="text/shared/01/06130000.xhp" name="Macro">Macro</link></paragraph> 99<paragraph role="paragraph" id="par_id3147576" xml-lang="en-US" l10n="U" oldref="2"><link href="text/shared/main0600.xhp" name="macro programming in $[officename]">Programming in %PRODUCTNAME</link></paragraph><comment>how-to running a macro</comment><comment>how-to testing and debugging a macro</comment></section> 100</case> 101<case select="CALC"><embed href="text/shared/guide/macro_recording.xhp#macrorecorder"/> 102</case> 103<case select="BASIC"><embed href="text/shared/guide/macro_recording.xhp#macrorecorder"/> 104</case> 105<default> 106<paragraph role="paragraph" id="par_id7797242" xml-lang="en-US" l10n="NEW">The macro recording functionality is only available for text documents in %PRODUCTNAME Writer and for spreadsheets in %PRODUCTNAME Calc.</paragraph> 107</default> 108</switch></body> 109</helpdocument> 110