OpenOffice.org/宏
外觀
如果你想執行重複性任務,使用宏自動執行是最佳選擇。宏是一系列用於計算機執行的指令。宏被廣泛應用於 Microsoft Office 的專業人士和專家使用者。OpenOffice.org 也可以執行宏。OpenOffice.org 可以透過 OpenOffice.org Basic(最簡單、最常用的語言)、Python、Beanshell 和 Javascript 進行指令碼編寫,此功能更廣為人知的是宏。
| 想象一下你有十二個電子表格需要在頁尾中新增你的姓名,將第一行設定為粗體,並將第四列突出顯示為紅色。如何在不逐個進行操作的情況下完成這些步驟?答案是錄製一個宏。 |
一個簡單的名為 Main 的宏,用於在 OpenOffice.org Basic 中將縮放比例縮放到 75%。
sub Main
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Zoom.Value"
args1(0).Value = 75
args1(1).Name = "Zoom.ValueSet"
args1(1).Value = 28703
args1(2).Name = "Zoom.Type"
args1(2).Value = 0
dispatcher.executeDispatch(document, ".uno:Zoom", "", 0, args1())
end sub
- 宏入門 - OpenOffice.org Wiki
- OpenOffice.org BASIC 程式設計指南 - OpenOffice.org Wiki
- OpenOffice.org 宏解釋
- Linux.com :: OpenOffice.org 宏入門
- 錄製和使用 Excel 宏 - Excel - Microsoft Office 線上
- 動手實踐:製作你的第一個宏 - Computeractive
- 為 Office 應用程式建立宏 - 2008 年 5 月 12 日 - Computeractive
- 簡潔明瞭:在 Word 和 Excel 中使用宏 - 2004 年 11 月 3 日 - Computeractive
- 宏變得簡單 - 2003 年 2 月 21 日 - Computeractive
| 一位讀者已將此章節標識為未完成的草稿或提綱。 您可以幫助 開發這項工作,或者您可以在 專案室 尋求幫助。 |