Administrera bibliotek och moduler

Basic Libraries Containers

LibreOffice Basic libraries can be stored in 3 different containers:

To access macros stored in libraries of Application Macros or My Macros from another container, including the document container, use the GlobalScope specifier.

Organisera bibliotek

Skapa ett nytt bibliotek

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Klicka på fliken Bibliotek.

  3. Select to where you want to attach the library in the Location list. If you select Application Macros & Dialogs, the library will belong to the LibreOffice 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.

  4. Klicka på Nytt och skriv det nya bibliotekets namn.

Importera ett bibliotek

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Klicka på fliken Bibliotek.

  3. Select to where you want to import the library in the Location list. If you select Application Macros & Dialogs, the library will belong to the LibreOffice 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.

  4. Klicka på Importera och välj ett externt bibliotek som ska läggas till.

  5. Markera alla bibliotek som ska läggas till i dialogrutan Importera bibliotek. Dialogrutan visar alla bibliotek som finns i den aktuella filen.

  6. Om du vill lägga till biblioteket som en referens markerar du kryssrutan Infoga som referens (bara läsning). Referensbibliotek har full funktionalitet men kan inte redigeras i Basic IDE-miljön.

  7. Markera kryssrutan Ersätt existerande bibliotek om du vill att befintliga bibliotek med samma namn ska skrivas över.

  8. Klicka på OK för att importera biblioteket.

Exportera ett bibliotek

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Klicka på fliken Bibliotek.

  3. Välj var ditt bibliotek är sparat under placering. Välj det bibliotek som du vill exportera. Notera att du inte kan exportera Standard-biblioteket.

  4. Klicka på Export...

  5. Choose whether you want to export the library as an extension or as a BASIC library.

  6. Klicka på OK.

  7. Välj vart du vill att biblioteket ska exporteras.

  8. Klicka på Spara för att exportera biblioteket.

Ta bort ett bibliotek

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Klicka på fliken Bibliotek.

  3. Markera biblioteket som ska tas bort från listan.

  4. Klicka på Radera.

Organisera moduler och dialogrutor

Skapa en ny modul eller dialog

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Klicka på fliken Moduler eller fliken Dialogrutor.

  3. Markera biblioteket där modulen ska infogas och klicka på Nytt.

  4. Skriv in ett namn för modulen eller dialogen och klicka på OK.

Ändra namn på en modul eller dialog

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Klicka två gånger på modulen som ska byta namn, med en paus mellan klicken. Skriv det nya namnet.

    Högerklicka på modulens eller dialogrutans namn på flikarna längst ned på skärmen i IDE-fönstret, välj Byt namn och skriv det nya namnet.

  3. Tryck på Retur för att bekräfta ändringarna.

Ta bort en modul eller dialog

  1. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  2. Klicka på fliken Moduler eller fliken Dialogrutor.

  3. Markera modulen eller dialogrutan som ska tas bort från listan. Om du vill visa undernivåer dubbelklickar du på ett objekt.

  4. Klicka på Radera.

warning

När du tar bort en modul raderas alla procedurer och funktioner i den modulen permanent.


Organisera projekt i dokument och mallar

Flytta och kopiera moduler mellan dokument, mallar och programmet.

  1. Öppna de dokument eller mallar som du ska flytta eller kopiera modulerna/dialogerna mellan.

  2. Choose Tools - Macros - Organize Macros - Basic and click Organizer or click the Select Module icon in the Basic IDE to open the Macro Organizer dialog.

  3. Om du vill flytta en modul eller dialogruta till ett annat dokument, klickar du på motsvarande objekt i listan och drar objektet till det nya dokumentet. Medan du trar objektet visar en horisontell linje var objektet kommer att infogas. Om du håller ned -tangenten när di drar kopieras objektet istället för att flyttas.

Stötta oss!