SlideShare a Scribd company logo
1 of 20
1
LibreOffice Brno 2016 Conference Presentation
Something About LibreOffice Macros
Franklin Weng
Sep. 8, 2016
2
LibreOffice Brno 2016 Conference Presentation
Before the story begins...
This session is NOT a technical speech.
It is a true story about my experiences.
In this story I'm not criticizing anyone or anything. I'm just
telling you what I experienced, and hope that we can do
something to make it better.
3
LibreOffice Brno 2016 Conference Presentation
Story Background...
4
LibreOffice Brno 2016 Conference Presentation
In Taiwan
People have been deeply bound to Microsoft [95, 98, NT,
Office*, Server*, …] for more than 20 years.
People can use Microsoft Office in many, many incredible
(Notice: "incredible" sometimes can be pronounced as
"ridiculous" as well) ways.
Here are some examples...
5
LibreOffice Brno 2016 Conference Presentation
6
LibreOffice Brno 2016 Conference Presentation
7
LibreOffice Brno 2016 Conference Presentation
8
LibreOffice Brno 2016 Conference Presentation
The Story Begins...
Taiwan has launched a three-year project to migrate
ODF/LibreOffice in all the governments.
Currently, almost all the training courses are for Writer, Calc
and Impress.
However, there are two important demands but not satisfied
yet:
1. Microsoft Access to LibreOffice Base
2. Microsoft Office Macros to LibreOffice Macros
9
LibreOffice Brno 2016 Conference Presentation
One day...
Someone asked me if I can teach writing macros with
LibreOffice Basic.
I used to write code with Basic (on APPLE II) / Pascal / C /
C++ / Perl / PHP / Bash / Csh / …… , but not a single line of
LibreOffice Basic (and Visual Basic).
"How hard can it be?"
10
LibreOffice Brno 2016 Conference Presentation
So Many Materials,
How Hard Can It Be?
11
LibreOffice Brno 2016 Conference Presentation
Then I Found...
The first document…
An ODT file of LibreOffice Basic Guide
Oops... Oops...
Hmm… it's okay. It shouldn't be
too far from v5 I think...
12
LibreOffice Brno 2016 Conference Presentation
I went on searching...
=_=|||
13
LibreOffice Brno 2016 Conference Presentation
Something useful...
Open Office Basic Programming Guide
Looked nice. But the last update time was Jan. 2013. Well,
okay.
LibreOffice Basic Help
Dialog? It seemed not what I want.
Writing a Macro in LibreOffice Calc -- Getting Started
That's it! A basic "Hello World" macro, which filled "Hello
World" into a cell in Calc! I finally found it!
Then… How to write a "Hello World" macro in Writer?
No, not `MsgBox "Hello World!" '.
14
LibreOffice Brno 2016 Conference Presentation
I Started to Feel Frustrated, So I
Called For Help...
I called a friend who are very familiar with Microsoft Office
macros and Open Office as well.
He gave me an one-line example of LibreOffice Basic running
on Writer:
ThisComponent.getText.String=”Hello World!”
ThisComponent.getText? Ah, it worked, and that's
interesting.
Then he gave me a good document:
Useful Macro Information for Open Office
15
LibreOffice Brno 2016 Conference Presentation
XRayTool
Then he told me to find and download XRayTool.
Bernard Marcelly web site
I downloaded XRayTool and installed. Then no surprise…
Failed to run... Orz
After a few debugging, I found the problem --
StarDesktop seems no longer a static global object.
I added the following code and it worked:
Dim StarDesktop As Object
StarDesktop =
createUnoService("com.sun.star.frame.Desktop")
New XRayTool URL: http://goo.gl/z68Veb
16
LibreOffice Brno 2016 Conference Presentation
After studying for some days...
With the help of my friend, XRayTool, and some old
documents, I started to understand a bit of the structure of the
API.
However, something was still not run as expected, like the
status bar.
Besides, so far I still didn't find a way to write a "Hello World"
macro running on Impress, displaying the universal string on
a slide.
17
LibreOffice Brno 2016 Conference Presentation
What I Wish to Have
A tutorial from the easiest "Hello World" to look deeply into the
UNO.
LibreOffice 5.1 Getting Started mentioned macros in Chapter
13 too. It's new and good, just that in the part of introducing
LibreOffice Basic I still feel it running "too fast".
18
LibreOffice Brno 2016 Conference Presentation
What I'm Doing Now
Now I'm writing a tutorial for LibreOffice Macros
From the simplest "Hello World" Basic program running on
Writer, Calc and Impress and compare their differences.
Several common examples to tell users how to write macros
in different applications.
How to rewrite the Microsoft Office macros in both Basic
and Python.
But…
Yes, it's written in Traditional Chinese.
Progress: less than 10%… (sigh
URL: https://goo.gl/ZcA9Pn
19
LibreOffice Brno 2016 Conference Presentation
Conclusion
Macro is an essential part for migrating LibreOffice in Taiwan.
The current documents are old ones, and not easy and
simple enough for users with little programming experiences,
(or experienced programmers without any experience of
Visual Basic like me…)
It's been a long time without new tutorials or documents for
LibreOffice macros until LibreOffice 5.1 Getting Started
published, though it's somehow still a bit "running to fast."
I'd like to change this so that we can promote LibreOffice
more smoothly and deeply.
20
LibreOffice Brno 2016 Conference Presentation
All text and image content in this document is licensed under the Creative Commons Attribution-Share Alike 3.0 License
(unless otherwise specified). "LibreOffice" and "The Document Foundation" are registered trademarks. Their respective logos
and icons are subject to international copyright laws. The use of these therefore is subject to the trademark policy.
Thank you
for using this template!
for coming to this session.
Anyone wants to
join me?

More Related Content

Similar to LibreOffice Conference 2016 -- Something About Macros

Building LibreOffice local community in Japan through event handling
Building LibreOffice local community in Japan through event handlingBuilding LibreOffice local community in Japan through event handling
Building LibreOffice local community in Japan through event handlingShinji Enoki
 
Translation ; Recent Information about LibreOffice
Translation ; Recent Information about LibreOfficeTranslation ; Recent Information about LibreOffice
Translation ; Recent Information about LibreOfficeMasataka Kondo
 
The Next Step of LibreOffice non-English Local Communities - LibreOffice Conf...
The Next Step of LibreOffice non-English Local Communities - LibreOffice Conf...The Next Step of LibreOffice non-English Local Communities - LibreOffice Conf...
The Next Step of LibreOffice non-English Local Communities - LibreOffice Conf...Naruhiko Ogasawara
 
Scilab for real dummies
Scilab for real dummiesScilab for real dummies
Scilab for real dummiesSunu Pradana
 
libocon16_areafill
libocon16_areafilllibocon16_areafill
libocon16_areafillHeiko Tietze
 
LibreOffice Development
LibreOffice DevelopmentLibreOffice Development
LibreOffice DevelopmentKohei Yoshida
 
How To be a Backend developer
How To be a Backend developer    How To be a Backend developer
How To be a Backend developer Ramy Hakam
 
Build a community, not a framework
Build a community, not a frameworkBuild a community, not a framework
Build a community, not a frameworkMatteo Collina
 
1000 Sepakers Conference In English #5
1000 Sepakers Conference In English #51000 Sepakers Conference In English #5
1000 Sepakers Conference In English #5Junichi Okamura
 
How to support LibreOffice with publishing projects
How to support LibreOffice with publishing projectsHow to support LibreOffice with publishing projects
How to support LibreOffice with publishing projectsLibreItalia
 
Language-Oriented Business Applications
Language-Oriented Business ApplicationsLanguage-Oriented Business Applications
Language-Oriented Business ApplicationsMarkus Voelter
 

Similar to LibreOffice Conference 2016 -- Something About Macros (20)

Building LibreOffice local community in Japan through event handling
Building LibreOffice local community in Japan through event handlingBuilding LibreOffice local community in Japan through event handling
Building LibreOffice local community in Japan through event handling
 
"Typical" bugs of LibreOffice in Japanese environment
"Typical" bugs of LibreOffice in Japanese environment"Typical" bugs of LibreOffice in Japanese environment
"Typical" bugs of LibreOffice in Japanese environment
 
Translation ; Recent Information about LibreOffice
Translation ; Recent Information about LibreOfficeTranslation ; Recent Information about LibreOffice
Translation ; Recent Information about LibreOffice
 
libocon16_uxdraw
libocon16_uxdrawlibocon16_uxdraw
libocon16_uxdraw
 
vbaintro.pdf
vbaintro.pdfvbaintro.pdf
vbaintro.pdf
 
The Next Step of LibreOffice non-English Local Communities - LibreOffice Conf...
The Next Step of LibreOffice non-English Local Communities - LibreOffice Conf...The Next Step of LibreOffice non-English Local Communities - LibreOffice Conf...
The Next Step of LibreOffice non-English Local Communities - LibreOffice Conf...
 
Scilabpdf
ScilabpdfScilabpdf
Scilabpdf
 
Scilab for real dummies
Scilab for real dummiesScilab for real dummies
Scilab for real dummies
 
LibreOffice intern activities 2017-2018 Aschalew
LibreOffice intern activities 2017-2018 AschalewLibreOffice intern activities 2017-2018 Aschalew
LibreOffice intern activities 2017-2018 Aschalew
 
libocon16_areafill
libocon16_areafilllibocon16_areafill
libocon16_areafill
 
LibreOffice Development
LibreOffice DevelopmentLibreOffice Development
LibreOffice Development
 
How To be a Backend developer
How To be a Backend developer    How To be a Backend developer
How To be a Backend developer
 
LibreOffice in Eastern Asia
LibreOffice in Eastern AsiaLibreOffice in Eastern Asia
LibreOffice in Eastern Asia
 
Build a community, not a framework
Build a community, not a frameworkBuild a community, not a framework
Build a community, not a framework
 
1000 Sepakers Conference In English #5
1000 Sepakers Conference In English #51000 Sepakers Conference In English #5
1000 Sepakers Conference In English #5
 
How to support LibreOffice with publishing projects
How to support LibreOffice with publishing projectsHow to support LibreOffice with publishing projects
How to support LibreOffice with publishing projects
 
Essay On Microsoft Office
Essay On Microsoft OfficeEssay On Microsoft Office
Essay On Microsoft Office
 
Libre office
Libre officeLibre office
Libre office
 
Internship final presentation Mohamed
Internship final presentation MohamedInternship final presentation Mohamed
Internship final presentation Mohamed
 
Language-Oriented Business Applications
Language-Oriented Business ApplicationsLanguage-Oriented Business Applications
Language-Oriented Business Applications
 

More from fweng322

自由軟體的國際化與在地化
自由軟體的國際化與在地化自由軟體的國際化與在地化
自由軟體的國際化與在地化fweng322
 
台中資訊組長研習 -- 不插電的資訊科學
台中資訊組長研習 -- 不插電的資訊科學台中資訊組長研習 -- 不插電的資訊科學
台中資訊組長研習 -- 不插電的資訊科學fweng322
 
台中資訊組長研習 -- ODF 開放文件標準格式
台中資訊組長研習 -- ODF 開放文件標準格式台中資訊組長研習 -- ODF 開放文件標準格式
台中資訊組長研習 -- ODF 開放文件標準格式fweng322
 
文件自由日
文件自由日文件自由日
文件自由日fweng322
 
自由軟體 & ezgo -- A+A space 分享
自由軟體 & ezgo -- A+A space 分享自由軟體 & ezgo -- A+A space 分享
自由軟體 & ezgo -- A+A space 分享fweng322
 
那些年,我學到的程式設計教育
那些年,我學到的程式設計教育那些年,我學到的程式設計教育
那些年,我學到的程式設計教育fweng322
 
成大資工自由軟體開發與社群發展課程
成大資工自由軟體開發與社群發展課程成大資工自由軟體開發與社群發展課程
成大資工自由軟體開發與社群發展課程fweng322
 
世界,程式教育的現在進行式
世界,程式教育的現在進行式世界,程式教育的現在進行式
世界,程式教育的現在進行式fweng322
 
軟體自由*自由軟體
軟體自由*自由軟體軟體自由*自由軟體
軟體自由*自由軟體fweng322
 
數位路平
數位路平數位路平
數位路平fweng322
 
Why We Insist Promoting FOSS in Taiwan's School -- Gnome Asia 2015
Why We Insist Promoting FOSS in Taiwan's School -- Gnome Asia 2015Why We Insist Promoting FOSS in Taiwan's School -- Gnome Asia 2015
Why We Insist Promoting FOSS in Taiwan's School -- Gnome Asia 2015fweng322
 
台北市研習_LAMP_20140815
台北市研習_LAMP_20140815台北市研習_LAMP_20140815
台北市研習_LAMP_20140815fweng322
 
TPET6 噗浪客年會心跳300 -- ezgo 開發
TPET6 噗浪客年會心跳300 -- ezgo 開發TPET6 噗浪客年會心跳300 -- ezgo 開發
TPET6 噗浪客年會心跳300 -- ezgo 開發fweng322
 
新北市教師工作坊 -- Bash script programming 介紹
新北市教師工作坊 -- Bash script programming 介紹新北市教師工作坊 -- Bash script programming 介紹
新北市教師工作坊 -- Bash script programming 介紹fweng322
 

More from fweng322 (14)

自由軟體的國際化與在地化
自由軟體的國際化與在地化自由軟體的國際化與在地化
自由軟體的國際化與在地化
 
台中資訊組長研習 -- 不插電的資訊科學
台中資訊組長研習 -- 不插電的資訊科學台中資訊組長研習 -- 不插電的資訊科學
台中資訊組長研習 -- 不插電的資訊科學
 
台中資訊組長研習 -- ODF 開放文件標準格式
台中資訊組長研習 -- ODF 開放文件標準格式台中資訊組長研習 -- ODF 開放文件標準格式
台中資訊組長研習 -- ODF 開放文件標準格式
 
文件自由日
文件自由日文件自由日
文件自由日
 
自由軟體 & ezgo -- A+A space 分享
自由軟體 & ezgo -- A+A space 分享自由軟體 & ezgo -- A+A space 分享
自由軟體 & ezgo -- A+A space 分享
 
那些年,我學到的程式設計教育
那些年,我學到的程式設計教育那些年,我學到的程式設計教育
那些年,我學到的程式設計教育
 
成大資工自由軟體開發與社群發展課程
成大資工自由軟體開發與社群發展課程成大資工自由軟體開發與社群發展課程
成大資工自由軟體開發與社群發展課程
 
世界,程式教育的現在進行式
世界,程式教育的現在進行式世界,程式教育的現在進行式
世界,程式教育的現在進行式
 
軟體自由*自由軟體
軟體自由*自由軟體軟體自由*自由軟體
軟體自由*自由軟體
 
數位路平
數位路平數位路平
數位路平
 
Why We Insist Promoting FOSS in Taiwan's School -- Gnome Asia 2015
Why We Insist Promoting FOSS in Taiwan's School -- Gnome Asia 2015Why We Insist Promoting FOSS in Taiwan's School -- Gnome Asia 2015
Why We Insist Promoting FOSS in Taiwan's School -- Gnome Asia 2015
 
台北市研習_LAMP_20140815
台北市研習_LAMP_20140815台北市研習_LAMP_20140815
台北市研習_LAMP_20140815
 
TPET6 噗浪客年會心跳300 -- ezgo 開發
TPET6 噗浪客年會心跳300 -- ezgo 開發TPET6 噗浪客年會心跳300 -- ezgo 開發
TPET6 噗浪客年會心跳300 -- ezgo 開發
 
新北市教師工作坊 -- Bash script programming 介紹
新北市教師工作坊 -- Bash script programming 介紹新北市教師工作坊 -- Bash script programming 介紹
新北市教師工作坊 -- Bash script programming 介紹
 

Recently uploaded

Event 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxEvent 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxaryanv1753
 
miladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxmiladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxCarrieButtitta
 
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...漢銘 謝
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSebastiano Panichella
 
Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Escort Service
 
Early Modern Spain. All about this period
Early Modern Spain. All about this periodEarly Modern Spain. All about this period
Early Modern Spain. All about this periodSaraIsabelJimenez
 
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRachelAnnTenibroAmaz
 
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.KathleenAnnCordero2
 
DGT @ CTAC 2024 Valencia: Most crucial invest to digitalisation_Sven Zoelle_v...
DGT @ CTAC 2024 Valencia: Most crucial invest to digitalisation_Sven Zoelle_v...DGT @ CTAC 2024 Valencia: Most crucial invest to digitalisation_Sven Zoelle_v...
DGT @ CTAC 2024 Valencia: Most crucial invest to digitalisation_Sven Zoelle_v...Henrik Hanke
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSebastiano Panichella
 
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxEngaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxAsifArshad8
 
Chizaram's Women Tech Makers Deck. .pptx
Chizaram's Women Tech Makers Deck.  .pptxChizaram's Women Tech Makers Deck.  .pptx
Chizaram's Women Tech Makers Deck. .pptxogubuikealex
 
Genshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxGenshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxJohnree4
 
The Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationThe Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationNathan Young
 
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.comSaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.comsaastr
 
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power
 
Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸mathanramanathan2005
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxmavinoikein
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringSebastiano Panichella
 
PHYSICS PROJECT BY MSC - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC  - NANOTECHNOLOGYPHYSICS PROJECT BY MSC  - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC - NANOTECHNOLOGYpruthirajnayak525
 

Recently uploaded (20)

Event 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxEvent 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptx
 
miladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxmiladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptx
 
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
 
Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170
 
Early Modern Spain. All about this period
Early Modern Spain. All about this periodEarly Modern Spain. All about this period
Early Modern Spain. All about this period
 
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
 
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
 
DGT @ CTAC 2024 Valencia: Most crucial invest to digitalisation_Sven Zoelle_v...
DGT @ CTAC 2024 Valencia: Most crucial invest to digitalisation_Sven Zoelle_v...DGT @ CTAC 2024 Valencia: Most crucial invest to digitalisation_Sven Zoelle_v...
DGT @ CTAC 2024 Valencia: Most crucial invest to digitalisation_Sven Zoelle_v...
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation Track
 
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxEngaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
 
Chizaram's Women Tech Makers Deck. .pptx
Chizaram's Women Tech Makers Deck.  .pptxChizaram's Women Tech Makers Deck.  .pptx
Chizaram's Women Tech Makers Deck. .pptx
 
Genshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxGenshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptx
 
The Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationThe Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism Presentation
 
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.comSaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
 
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
 
Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptx
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software Engineering
 
PHYSICS PROJECT BY MSC - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC  - NANOTECHNOLOGYPHYSICS PROJECT BY MSC  - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC - NANOTECHNOLOGY
 

LibreOffice Conference 2016 -- Something About Macros

  • 1. 1 LibreOffice Brno 2016 Conference Presentation Something About LibreOffice Macros Franklin Weng Sep. 8, 2016
  • 2. 2 LibreOffice Brno 2016 Conference Presentation Before the story begins... This session is NOT a technical speech. It is a true story about my experiences. In this story I'm not criticizing anyone or anything. I'm just telling you what I experienced, and hope that we can do something to make it better.
  • 3. 3 LibreOffice Brno 2016 Conference Presentation Story Background...
  • 4. 4 LibreOffice Brno 2016 Conference Presentation In Taiwan People have been deeply bound to Microsoft [95, 98, NT, Office*, Server*, …] for more than 20 years. People can use Microsoft Office in many, many incredible (Notice: "incredible" sometimes can be pronounced as "ridiculous" as well) ways. Here are some examples...
  • 5. 5 LibreOffice Brno 2016 Conference Presentation
  • 6. 6 LibreOffice Brno 2016 Conference Presentation
  • 7. 7 LibreOffice Brno 2016 Conference Presentation
  • 8. 8 LibreOffice Brno 2016 Conference Presentation The Story Begins... Taiwan has launched a three-year project to migrate ODF/LibreOffice in all the governments. Currently, almost all the training courses are for Writer, Calc and Impress. However, there are two important demands but not satisfied yet: 1. Microsoft Access to LibreOffice Base 2. Microsoft Office Macros to LibreOffice Macros
  • 9. 9 LibreOffice Brno 2016 Conference Presentation One day... Someone asked me if I can teach writing macros with LibreOffice Basic. I used to write code with Basic (on APPLE II) / Pascal / C / C++ / Perl / PHP / Bash / Csh / …… , but not a single line of LibreOffice Basic (and Visual Basic). "How hard can it be?"
  • 10. 10 LibreOffice Brno 2016 Conference Presentation So Many Materials, How Hard Can It Be?
  • 11. 11 LibreOffice Brno 2016 Conference Presentation Then I Found... The first document… An ODT file of LibreOffice Basic Guide Oops... Oops... Hmm… it's okay. It shouldn't be too far from v5 I think...
  • 12. 12 LibreOffice Brno 2016 Conference Presentation I went on searching... =_=|||
  • 13. 13 LibreOffice Brno 2016 Conference Presentation Something useful... Open Office Basic Programming Guide Looked nice. But the last update time was Jan. 2013. Well, okay. LibreOffice Basic Help Dialog? It seemed not what I want. Writing a Macro in LibreOffice Calc -- Getting Started That's it! A basic "Hello World" macro, which filled "Hello World" into a cell in Calc! I finally found it! Then… How to write a "Hello World" macro in Writer? No, not `MsgBox "Hello World!" '.
  • 14. 14 LibreOffice Brno 2016 Conference Presentation I Started to Feel Frustrated, So I Called For Help... I called a friend who are very familiar with Microsoft Office macros and Open Office as well. He gave me an one-line example of LibreOffice Basic running on Writer: ThisComponent.getText.String=”Hello World!” ThisComponent.getText? Ah, it worked, and that's interesting. Then he gave me a good document: Useful Macro Information for Open Office
  • 15. 15 LibreOffice Brno 2016 Conference Presentation XRayTool Then he told me to find and download XRayTool. Bernard Marcelly web site I downloaded XRayTool and installed. Then no surprise… Failed to run... Orz After a few debugging, I found the problem -- StarDesktop seems no longer a static global object. I added the following code and it worked: Dim StarDesktop As Object StarDesktop = createUnoService("com.sun.star.frame.Desktop") New XRayTool URL: http://goo.gl/z68Veb
  • 16. 16 LibreOffice Brno 2016 Conference Presentation After studying for some days... With the help of my friend, XRayTool, and some old documents, I started to understand a bit of the structure of the API. However, something was still not run as expected, like the status bar. Besides, so far I still didn't find a way to write a "Hello World" macro running on Impress, displaying the universal string on a slide.
  • 17. 17 LibreOffice Brno 2016 Conference Presentation What I Wish to Have A tutorial from the easiest "Hello World" to look deeply into the UNO. LibreOffice 5.1 Getting Started mentioned macros in Chapter 13 too. It's new and good, just that in the part of introducing LibreOffice Basic I still feel it running "too fast".
  • 18. 18 LibreOffice Brno 2016 Conference Presentation What I'm Doing Now Now I'm writing a tutorial for LibreOffice Macros From the simplest "Hello World" Basic program running on Writer, Calc and Impress and compare their differences. Several common examples to tell users how to write macros in different applications. How to rewrite the Microsoft Office macros in both Basic and Python. But… Yes, it's written in Traditional Chinese. Progress: less than 10%… (sigh URL: https://goo.gl/ZcA9Pn
  • 19. 19 LibreOffice Brno 2016 Conference Presentation Conclusion Macro is an essential part for migrating LibreOffice in Taiwan. The current documents are old ones, and not easy and simple enough for users with little programming experiences, (or experienced programmers without any experience of Visual Basic like me…) It's been a long time without new tutorials or documents for LibreOffice macros until LibreOffice 5.1 Getting Started published, though it's somehow still a bit "running to fast." I'd like to change this so that we can promote LibreOffice more smoothly and deeply.
  • 20. 20 LibreOffice Brno 2016 Conference Presentation All text and image content in this document is licensed under the Creative Commons Attribution-Share Alike 3.0 License (unless otherwise specified). "LibreOffice" and "The Document Foundation" are registered trademarks. Their respective logos and icons are subject to international copyright laws. The use of these therefore is subject to the trademark policy. Thank you for using this template! for coming to this session. Anyone wants to join me?