Document Event-Driven Macros

This section describes how to assign scripts to application, document or form events.

You can automatically execute a macro when a specified software event occurs by assigning the desired macro to the event. The following table provides an overview of document events and at what point an assigned macro is executed.

이벤트

할당된 매크로가 실행됩니다...

routine

Start Application

...after a Collabora Office application is started.

OnStartApp

Close Application

...Collabora Office 응용 프로그램이 종료되기 전

OnCloseApp

Document created

...New document created with File - New or with the New icon. Note that this event also fires when Basic IDE opens.

OnCreate

New Document

...파일 - 새로 만들기 또는 새로 만들기 아이콘을 사용하여 새 문서를 만든 후

OnNew

Document loading finished

...before a document is opened with File - Open or with the Open icon.

OnLoadFinished

문서 열기

...파일 - 열기 또는 열기 아이콘을 사용하여 문서를 연 후

OnLoad

Document is going to be closed

...문서를 닫기 전

OnPrepareUnload

닫힌 문서

...문서를 닫은 후. 문서를 닫기 전에 저장하면 "문서 저장" 이벤트도 발생할 수 있다는 것에 주의합니다.

OnUnload

-no UI-

OnLayoutFinished

View created

Document is displayed. Note that this event also happens when a document is duplicated.

OnViewCreated

View is going to be closed

Document layout is getting removed.

OnPrepareViewClosing

View closed

Document layout is cleared prior to the document closure.

OnViewClosed

문서 활성화

...문서를 맨 앞으로 가져온 후

OnFocus

문서 비활성화

...다른 문서를 맨 앞으로 가져온 후

OnUnfocus

문서 저장

...파일 - 저장 또는 저장 아이콘을 사용하여 문서를 저장하기 전(문서 이름을 이미 지정한 경우)

OnSaveAs

문서가 저장되었습니다.

...파일 - 저장 또는 저장 아이콘을 사용하여 문서를 저장한 후(문서 이름을 이미 지정한 경우)

OnSaveDone

Saving of document failed

Document could not be saved.

OnSaveFailed

문서를 다른 이름으로 저장

...문서를 지정한 이름으로 저장하기 전(파일 - 다른 이름으로 저장을 사용하거나 문서 이름을 아직 지정하지 않은 경우 파일 - 저장 또는 저장 아이콘 사용)

OnSaveAs

문서가 다음의 이름으로 저장되었습니다.

... 문서를 지정된 이름으로 저장한 후(파일 - 다른 이름으로 저장을 사용하거나 문서 이름을 아직 지정하지 않은 경우 파일 - 저장 메뉴 또는 저장 아이콘을 사용하여 저장한 경우)

OnSaveAsDone

'Save As' has failed

Document could not be saved.

OnSaveAsFailed

-no UI-

When the document disk location has changed, for example after a File - Save As action.

OnStorageChanged

Storing or exporting copy of document

...before a document is saved with File - Save a Copy, File - Export, File - Export as PDF or the Save icons.

OnCopyTo

Document copy has been created

...after a document is saved with File - Save a Copy, File - Export, File - Export as PDF or the Save icons.

OnCopyToDone

Creating of document copy failed

Document could not be copied or exported.

OnCopyToFailed

Print document

...after the Print dialog is closed, but before the actual print process begins. This event occurs for each copy printed.

OnPrint

-no UI-

...after document security settings have changed.

OnModeChanged

'Modified' status was changed

Modified state of a document has changed.

OnModifyChanged

Document title changed

When the document title gets updated.

OnTitleChanged

Loaded a sub component

...after a database form has been opened.

OnSubComponentOpened

Closed a sub component

...after a database form has been closed.

OnSubComponentClosed

Printing of form letters started

...before printing form letters using File - Print or Tools - Mail Merge Wizard menus.

OnMailMerge

Printing of form letters finished

...after printing of form letters using File - Print or Tools - Mail Merge Wizard menus.

OnMailMergeFinished

Printing of form fields started

...before printing form fields.

OnFieldMerge

Printing of form fields finished

...after printing form fields.

OnFieldMergeFinished

페이지 수 변경

When the page count changes.

OnPageCountChanged


note

Most events relate to documents, except OnStartApp, OnCloseApp, OnCreate and OnLoadFinished that occur at application level. OnSubComponentOpened, and OnSubComponentClosed events are fired by database's forms.


tip

Writer documents are triggering those specific events: OnLayoutFinished, OnMailMerge, OnMailMergeFinished, OnFieldMerge, OnFieldMergeFinished and OnPageCountChanged.


이벤트에 매크로 할당

  1. 도구 - 사용자 정의를 선택하고 이벤트 탭을 선택합니다.

  2. 저장 위치 목록 상자에서 할당을 전역적으로 유효하게 할지 또는 현재 문서에서만 유효하게 할지 선택합니다.

  3. 이벤트 목록에서 이벤트를 선택합니다.

  4. 매크로를 클릭하고 선택한 이벤트에 할당할 매크로를 선택합니다.

  5. 확인을 클릭하여 매크로를 할당합니다.

  6. 확인을 클릭하여 대화 상자를 닫습니다.

이벤트에 대한 매크로 할당 제거

  1. 도구 - 사용자 정의를 선택하고 이벤트 탭을 선택합니다.

  2. 저장 위치 목록 상자의 옵션을 선택하여 전역 할당 또는 현재 문서에서만 유효한 할당을 제거할지 선택합니다.

  3. 제거할 할당이 포함된 이벤트를 이벤트 목록에서 선택합니다.

  4. 제거를 클릭합니다.

  5. 확인을 클릭하여 대화 상자를 닫습니다.

In addition to assigning macros to events, one can monitor events triggered in Collabora Office documents.

Please support us!