1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<helpdocument version="1.0">
<meta>
<topic id="textsbasicshared01030400xml" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">Organizing Libraries and Modules</title>
<filename>/text/sbasic/shared/01030400.xhp</filename>
</topic>
</meta>
<body>
<section id="anlegenverwalten">
<bookmark xml-lang="en-US" branch="index" id="bm_id3148797">
<bookmark_value>libraries;organizing</bookmark_value>
<bookmark_value>libraries;containers</bookmark_value>
<bookmark_value>modules;organizing</bookmark_value>
<bookmark_value>copying;modules</bookmark_value>
<bookmark_value>adding libraries</bookmark_value>
<bookmark_value>deleting;libraries/modules/dialogs</bookmark_value>
<bookmark_value>dialogs;organizing</bookmark_value>
<bookmark_value>moving;modules</bookmark_value>
<bookmark_value>organizing;modules/libraries/dialogs</bookmark_value>
<bookmark_value>renaming modules and dialogs</bookmark_value>
</bookmark><h1 id="hd_id3148797"><variable id="01030400"><link href="text/sbasic/shared/01030400.xhp">Organizing Libraries and Modules</link>
</variable></h1>
</section>
<h2 id="hd_id371574080559061">Basic Libraries Containers</h2>
<paragraph role="paragraph" id="par_id961574080563824">%PRODUCTNAME Basic libraries can be stored in 3 different containers:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id571574079618609" role="listitem"><emph>%PRODUCTNAME Macros</emph>: libraries stored in this container are available for all users of the computer and are managed by the computer administrator. The container is located in the %PRODUCTNAME installation directory.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id151574079741214" role="listitem"><emph>My Macros</emph>: libraries stored in this container are available to all documents of your user. The container is located in the user profile area and is not accessible by another user.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id581574080384335" role="listitem"><emph>Document</emph>: libraries stored in the document container are only available for the document and are accessible only when the document is open. You cannot access macros of a document from another document.</paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id881574081445896">To access macros stored in libraries of <emph>%PRODUCTNAME Macros</emph> or <emph>My Macros</emph> from another container, including the document container, use the <link href="text/sbasic/shared/03131900.xhp" name="GlobalScope">GlobalScope specifier</link>.</paragraph>
<h2 id="hd_id3150868">Organizing Libraries</h2>
<h3 id="hd_id3125864">Creating a New Library</h3>
<list type="ordered">
<listitem>
<paragraph role="listitem" id="par_id3152576" xml-lang="en-US">Choose <emph>Tools - Macros - Organize Macros - %PRODUCTNAME Basic</emph> and click <emph>Organizer</emph> or click the <emph>Select Module</emph> icon in the Basic IDE to open the <emph>Macro Organizer</emph> dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3153726" xml-lang="en-US">Click the <emph>Libraries</emph> tab.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3149664" xml-lang="en-US">Select to where you want to attach the library in the <emph>Location</emph> list. If you select %PRODUCTNAME Macros & Dialogs, the library will belong to the $[officename] application and will be available for all documents. If you select a document the library will be attached to this document and only available from there.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3153365" xml-lang="en-US">Click <emph>New</emph> and insert a name to create a new library.</paragraph>
</listitem>
</list>
<h3 id="hd_id3147394">Import a Library</h3>
<list type="ordered">
<listitem>
<paragraph role="listitem" id="par_id3153157" xml-lang="en-US">Choose <emph>Tools - Macros - Organize Macros - %PRODUCTNAME Basic</emph> and click <emph>Organizer</emph> or click the <emph>Select Module</emph> icon in the Basic IDE to open the <emph>Macro Organizer</emph> dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3146972" xml-lang="en-US">Click the <emph>Libraries</emph> tab.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3145640" xml-lang="en-US">Select to where you want to import the library in the <emph>Location</emph> list. If you select %PRODUCTNAME Macros & Dialogs, the library will belong to the $[officename] application and will be available for all documents. If you select a document the library will be imported to this document and only available from there.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3154253" xml-lang="en-US">Click <emph>Import...</emph> and select an external library to import.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3154705" xml-lang="en-US">Select all libraries to be imported in the <emph>Import Libraries</emph> dialog. The dialog displays all libraries that are contained in the selected file.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3163807" xml-lang="en-US">If you want to insert the library as a reference only check the <emph>Insert as reference (read-only)</emph> box. Read-only libraries are fully functional but cannot be modified in the Basic IDE.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3145228" xml-lang="en-US">Check the <emph>Replace existing libraries</emph> box if you want existing libraries of the same name to be overwritten.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3147004" xml-lang="en-US">Click <emph>OK</emph> to import the library.</paragraph>
</listitem>
</list>
<h3 id="hd_id3159099">Export a Library</h3>
<list type="ordered">
<listitem>
<paragraph role="listitem" id="par_id3147005" xml-lang="en-US">Choose <emph>Tools - Macros - Organize Macros - %PRODUCTNAME Basic</emph> and click <emph>Organizer</emph> or click the <emph>Select Module</emph> icon in the Basic IDE to open the <emph>Macro Organizer</emph> dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3147006" xml-lang="en-US">Click the <emph>Libraries</emph> tab.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3147007" xml-lang="en-US">In the <emph>Location</emph> list you specify where your library is stored. Select the library that you want to export. Note that you cannot export the <emph>Standard</emph> library.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3147008" xml-lang="en-US">Click <emph>Export...</emph></paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3147009" xml-lang="en-US">Choose whether you want to export the library as an extension or as a basic library.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3147010" xml-lang="en-US">Click <emph>OK</emph>.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3147011" xml-lang="en-US">Select where you want your library exported.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3147012" xml-lang="en-US">Click <emph>Save</emph> to export the library.</paragraph>
</listitem>
</list>
<h3 id="hd_id3159100">Deleting a Library</h3>
<list type="ordered">
<listitem>
<paragraph role="listitem" id="par_id3150086" xml-lang="en-US">Choose <emph>Tools - Macros - Organize Macros - %PRODUCTNAME Basic</emph> and click <emph>Organizer</emph> or click the <emph>Select Module</emph> icon in the Basic IDE to open the <emph>Macro Organizer</emph> dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3146808" xml-lang="en-US">Click the <emph>Libraries</emph> tab.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3158212" xml-lang="en-US">Select the library to be deleted from the list.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3150361" xml-lang="en-US">Click <emph>Delete</emph>.</paragraph>
</listitem>
</list>
<list type="unordered">
<listitem>
<paragraph role="listitem" id="par_id3152986" xml-lang="en-US">Deleting a library permanently deletes all existing modules and corresponding procedures and functions.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3148868" xml-lang="en-US">You cannot delete the default library named "Standard".</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3146869" xml-lang="en-US">If you delete a library that was inserted as reference only the reference is deleted but not the library itself.</paragraph>
</listitem>
</list>
<h2 id="hd_id3147070">Organizing Modules and Dialogs</h2>
<h3 id="hd_id3155265">Creating a New Module or Dialog</h3>
<list type="ordered">
<listitem>
<paragraph role="listitem" id="par_id3154537" xml-lang="en-US">Choose <emph>Tools - Macros - Organize Macros - %PRODUCTNAME Basic</emph> and click <emph>Organizer</emph> or click the <emph>Select Module</emph> icon in the Basic IDE to open the <emph>Macro Organizer</emph> dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3146781" xml-lang="en-US">Click the <emph>Modules</emph> tab or the <emph>Dialogs</emph> tab.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3159206" xml-lang="en-US">Select the library where the module will be inserted and click <emph>New</emph>.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3152389" xml-lang="en-US">Enter a name for the module or the dialog and click <emph>OK</emph>.</paragraph>
</listitem>
</list>
<h3 id="hd_id3152872">Renaming a Module or Dialog</h3>
<list type="ordered">
<listitem>
<paragraph role="listitem" id="par_id3159230" xml-lang="en-US">Choose <emph>Tools - Macros - Organize Macros - %PRODUCTNAME Basic</emph> and click <emph>Organizer</emph> or click the <emph>Select Module</emph> icon in the Basic IDE to open the <emph>Macro Organizer</emph> dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3150046" xml-lang="en-US">Click the module to be renamed twice, with a pause between the clicks. Enter the new name.</paragraph>
<paragraph role="listitem" id="par_id3153801" xml-lang="en-US">In the Basic IDE, right-click the name of the module or dialog in the tabs at the bottom of the screen, choose <emph>Rename</emph> and type in the new name.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3155526" xml-lang="en-US">Press Enter to confirm your changes.</paragraph>
</listitem>
</list>
<h3 id="hd_id3146963">Deleting a Module or Dialog</h3>
<list type="ordered">
<listitem>
<paragraph role="listitem" id="par_id3147547" xml-lang="en-US">Choose <emph>Tools - Macros - Organize Macros - %PRODUCTNAME Basic</emph> and click <emph>Organizer</emph> or click the <emph>Select Module</emph> icon in the Basic IDE to open the <emph>Macro Organizer</emph> dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3150958" xml-lang="en-US">Click the <emph>Modules</emph> tab or the <emph>Dialogs</emph> tab.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3149870" xml-lang="en-US">Select the module or dialog to be deleted from the list. Double-click an entry to reveal sub-entries, if required.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3147248" xml-lang="en-US">Click <emph>Delete</emph>.</paragraph>
</listitem>
</list>
<warning id="par_id3151339">Deleting a module permanently deletes all existing procedures and functions in that module.</warning>
<h2 id="hd_id3151392">Organizing Projects among Documents or Templates</h2>
<h3 id="hd_id3156400">Moving or copying modules between documents, templates and the application.</h3>
<list type="ordered">
<listitem>
<paragraph role="listitem" id="par_id3146819" xml-lang="en-US">Open all documents or templates among which you want to move or copy the modules or dialogs.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3149319" xml-lang="en-US">Choose <emph>Tools - Macros - Organize Macros - %PRODUCTNAME Basic</emph> and click <emph>Organizer</emph> or click the <emph>Select Module</emph> icon in the Basic IDE to open the <emph>Macro Organizer</emph> dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3145637" xml-lang="en-US">To move a module or dialog to another document, click the corresponding object in the list and drag it to the desired position. A horizontal line indicates the target position of the current object while dragging. Hold the <switchinline select="sys"><caseinline select="MAC">Command</caseinline><defaultinline>Ctrl</defaultinline></switchinline> key while dragging to copy the object instead of moving it.</paragraph>
</listitem>
</list>
</body>
</helpdocument>
|