Automating OpenOffice: Customizing the Toolbar. Improve OpenOffice Automization by Adding a Custom Button by dorodor

View this thread on steempeak.com
· @dorodor · (edited)
$22.19
Automating OpenOffice: Customizing the Toolbar. Improve OpenOffice Automization by Adding a Custom Button
**Many tasks can be made much easier by using macros in OpenOffice. That process of automation can be improved even more by customizing the OpenOffice toolbars.**

OpenOffice.org's macro language is quick to learn and and easy to use. In a relatively short time even a brand new user can automate many of the tasks that would have otherwise taken up a large amount of time and effort. However, running the macro can still be laborious, with the user always having to do the following:

1. click on Tools
2. click on Macros
3. click on Run Macros
4. select the right macro (in the correct library and module)
5. click on Run

Fortunately, this can all be done in a single click - by customizing the toolbar; and the aim of this customization is to:

- place a new button on the toolbar
- run a defined macro whenever the button is pressed

![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513150815/pwhcfgqjfhiw0fpnlnt8.png)


**Writing an OpenOffice Basic Macro**

Before the toolbar customization can take place a macro must be created by using the OpenOffice.org Basic IDE (Integrated Development Environment); and at this point the less experienced user might want to pause and read the article "Using Macros to Automate OpenOffice.org Calc". The macro can be as complicated or as simple as is necessary, for example, the following macro loads a random number into a selected cell in a Calc spreadsheet:

<pre><code>Sub RandomNumberToActiveCell
oCell = thisComponent.getCurrentSelection
oCell.Value = int ( 10 * Rnd )
End Sub</code></pre>

<br>If this macro is saved into Module1 in the Standard library in the 'My Macros' area then the user can run it by:

- clicking on a cell in their Calc spreadsheet
- clicking on Tools
- clicking on Macros
-  clicking on Run Macros
- selecting My Macros
- selecting Standard
- selecting Module1
- selecting RandomNumberToActiveCell
- clicking on Run

Obviously they'd get very bored if they had to do this often, but fortunately, customizing the toolbar will enable them to do this in a single click.

**Adding a Button to an OpenOffice Calc Toolbar**

The process for adding a button for this new macro is quite simple:

- click on Tools
- click on Customize
- select the Toolbars tab
- select the toolbar to be modified (the default is the standard toolbar)
- in the Commands pane select the point at which the button is to be added
- click on Add
- scroll down to find the macro - in this case:
        - OpenOffice.org Macros
        - My Macros
        - Standard
        - Module1
       - RandomNumberToActiveCell
- click on Add

A button for the macro will now be displayed on the toolbar; and if the user now selects a cell and presses the new button then a random number will be displayed in the cell as expected. However, anyone looking at this new button will not be impressed at the moment - it works correctly, but the button will just have the word 'RandomNumberToActiveCell' on it.

**Changing the Look of the Custom Button**

With the macro itself working the user needs to turn their attention to the look of the button that's just been created - in this case changing the button to an icon. They will need to:

- click on Tools
- click on Customize
- select the Toolbars tab
- select the button for the new macro
- click on modify
- click on Change Icon
- select an appropriate icon or import a new one

The user will now have the button looking the way that they want; doing the job that they want; at their fingertips all of the time; and any task is now 1 click long instead of 8.

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@dorodor/automating-openoffice-customizing-the-toolbar-improve-openoffice-automization-by-adding-a-custom-button">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , ,
properties (23)
post_id20,297,208
authordorodor
permlinkautomating-openoffice-customizing-the-toolbar-improve-openoffice-automization-by-adding-a-custom-button
categoryutopian-io
json_metadata"{"type": "tutorials", "repository": {"compare_url": "https://api.github.com/repos/apache/openoffice/compare/{base}...{head}", "events_url": "https://api.github.com/repos/apache/openoffice/events", "forks": 117, "merges_url": "https://api.github.com/repos/apache/openoffice/merges", "issues_url": "https://api.github.com/repos/apache/openoffice/issues{/number}", "contents_url": "https://api.github.com/repos/apache/openoffice/contents/{+path}", "fork": false, "git_url": "git://github.com/apache/openoffice.git", "assignees_url": "https://api.github.com/repos/apache/openoffice/assignees{/user}", "owner": {"login": "apache", "type": "Organization", "following_url": "https://api.github.com/users/apache/following{/other_user}", "received_events_url": "https://api.github.com/users/apache/received_events", "subscriptions_url": "https://api.github.com/users/apache/subscriptions", "repos_url": "https://api.github.com/users/apache/repos", "gravatar_id": "", "organizations_url": "https://api.github.com/users/apache/orgs", "id": 47359, "avatar_url": "https://avatars0.githubusercontent.com/u/47359?v=4", "site_admin": false, "followers_url": "https://api.github.com/users/apache/followers", "gists_url": "https://api.github.com/users/apache/gists{/gist_id}", "html_url": "https://github.com/apache", "events_url": "https://api.github.com/users/apache/events{/privacy}", "url": "https://api.github.com/users/apache", "starred_url": "https://api.github.com/users/apache/starred{/owner}{/repo}"}, "size": 1577739, "issue_events_url": "https://api.github.com/repos/apache/openoffice/issues/events{/number}", "git_refs_url": "https://api.github.com/repos/apache/openoffice/git/refs{/sha}", "blobs_url": "https://api.github.com/repos/apache/openoffice/git/blobs{/sha}", "pushed_at": "2017-12-13T00:17:59Z", "watchers_count": 170, "stargazers_url": "https://api.github.com/repos/apache/openoffice/stargazers", "teams_url": "https://api.github.com/repos/apache/openoffice/teams", "comments_url": "https://api.github.com/repos/apache/openoffice/comments{/number}", "archived": false, "svn_url": "https://github.com/apache/openoffice", "id": 14357669, "subscribers_url": "https://api.github.com/repos/apache/openoffice/subscribers", "watchers": 170, "ssh_url": "git@github.com:apache/openoffice.git", "name": "openoffice", "mirror_url": null, "statuses_url": "https://api.github.com/repos/apache/openoffice/statuses/{sha}", "has_projects": true, "milestones_url": "https://api.github.com/repos/apache/openoffice/milestones{/number}", "description": "Mirror of Apache OpenOffice", "has_downloads": true, "keys_url": "https://api.github.com/repos/apache/openoffice/keys{/key_id}", "url": "https://api.github.com/repos/apache/openoffice", "license": null, "html_url": "https://github.com/apache/openoffice", "commits_url": "https://api.github.com/repos/apache/openoffice/commits{/sha}", "open_issues_count": 3, "stargazers_count": 170, "branches_url": "https://api.github.com/repos/apache/openoffice/branches{/branch}", "score": 109.3994, "forks_url": "https://api.github.com/repos/apache/openoffice/forks", "deployments_url": "https://api.github.com/repos/apache/openoffice/deployments", "language": "C++", "homepage": null, "trees_url": "https://api.github.com/repos/apache/openoffice/git/trees{/sha}", "has_issues": false, "collaborators_url": "https://api.github.com/repos/apache/openoffice/collaborators{/collaborator}", "git_commits_url": "https://api.github.com/repos/apache/openoffice/git/commits{/sha}", "open_issues": 3, "private": false, "git_tags_url": "https://api.github.com/repos/apache/openoffice/git/tags{/sha}", "pulls_url": "https://api.github.com/repos/apache/openoffice/pulls{/number}", "releases_url": "https://api.github.com/repos/apache/openoffice/releases{/id}", "notifications_url": "https://api.github.com/repos/apache/openoffice/notifications{?since,all,participating}", "contributors_url": "https://api.github.com/repos/apache/openoffice/contributors", "full_name": "apache/openoffice", "updated_at": "2017-12-11T23:06:48Z", "forks_count": 117, "downloads_url": "https://api.github.com/repos/apache/openoffice/downloads", "hooks_url": "https://api.github.com/repos/apache/openoffice/hooks", "languages_url": "https://api.github.com/repos/apache/openoffice/languages", "default_branch": "trunk", "labels_url": "https://api.github.com/repos/apache/openoffice/labels{/name}", "issue_comment_url": "https://api.github.com/repos/apache/openoffice/issues/comments{/number}", "has_pages": false, "tags_url": "https://api.github.com/repos/apache/openoffice/tags", "clone_url": "https://github.com/apache/openoffice.git", "archive_url": "https://api.github.com/repos/apache/openoffice/{archive_format}{/ref}", "has_wiki": false, "created_at": "2013-11-13T08:00:13Z", "subscription_url": "https://api.github.com/repos/apache/openoffice/subscription"}, "pullRequests": [], "format": "markdown", "image": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1513150815/pwhcfgqjfhiw0fpnlnt8.png"], "links": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1513150815/pwhcfgqjfhiw0fpnlnt8.png"], "app": "utopian/1.0.0", "platform": "github", "tags": ["utopian-io", "openoffice", "opensource", "tutorial"], "community": "utopian", "users": ["dorodor"]}"
created2017-12-13 07:40:57
last_update2017-12-13 07:42:27
depth0
children4
net_rshares4,842,043,100,697
last_payout2017-12-20 07:40:57
cashout_time1969-12-31 23:59:59
total_payout_value16.498 SBD
curator_payout_value5.689 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length3,803
author_reputation4,387,551,450,260
root_title"Automating OpenOffice: Customizing the Toolbar. Improve OpenOffice Automization by Adding a Custom Button"
beneficiaries
0.
accountcnts
weight10
1.
accountdamla
weight25
2.
accountfreedom
weight658
3.
accountnetuoso
weight6
4.
accountsimnrodrguez
weight21
5.
accounttransisto
weight70
6.
accountutopian-io
weight536
7.
accountxeldal
weight27
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (9)
@steemitboard ·
Congratulations @dorodor! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/payout.png)](http://steemitboard.com/@dorodor) Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard)

If you no longer want to receive notifications, reply to this comment with the word `STOP`

> By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
properties (22)
post_id20,307,886
authorsteemitboard
permlinksteemitboard-notify-dorodor-20171213t100755000z
categoryutopian-io
json_metadata"{"image": ["https://steemitboard.com/img/notifications.png"]}"
created2017-12-13 10:07:36
last_update2017-12-13 10:07:36
depth1
children0
net_rshares0
last_payout2017-12-20 10:07:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length689
author_reputation38,705,954,145,809
root_title"Automating OpenOffice: Customizing the Toolbar. Improve OpenOffice Automization by Adding a Custom Button"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@upvotelife ·
I follow you😃 good work
properties (22)
post_id20,309,703
authorupvotelife
permlinkre-dorodor-automating-openoffice-customizing-the-toolbar-improve-openoffice-automization-by-adding-a-custom-button-20171213t103348110z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "tags": ["utopian-io"]}"
created2017-12-13 10:33:51
last_update2017-12-13 10:33:51
depth1
children0
net_rshares0
last_payout2017-12-20 10:33:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length23
author_reputation10,551,964,788,902
root_title"Automating OpenOffice: Customizing the Toolbar. Improve OpenOffice Automization by Adding a Custom Button"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@shreyasgune ·
Thank you for the contribution. It has been approved.

You can contact us on [Discord](https://discord.gg/UCvqCsx).
**[[utopian-moderator]](https://utopian.io/moderators)**
properties (22)
post_id20,426,314
authorshreyasgune
permlinkre-dorodor-automating-openoffice-customizing-the-toolbar-improve-openoffice-automization-by-adding-a-custom-button-20171214t114039926z
categoryutopian-io
json_metadata"{"app": "busy/1.0.0", "community": "busy", "tags": ["utopian-io"]}"
created2017-12-14 11:40:42
last_update2017-12-14 11:40:42
depth1
children0
net_rshares0
last_payout2017-12-21 11:40:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length172
author_reputation4,922,913,696,391
root_title"Automating OpenOffice: Customizing the Toolbar. Improve OpenOffice Automization by Adding a Custom Button"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@utopian-io ·
### Hey @dorodor I am @utopian-io. I have just upvoted you!
#### Achievements
- You have less than 500 followers. Just gave you a gift to help you succeed!
- Seems like you contribute quite often. AMAZING!
#### Suggestions
- Contribute more often to get higher and higher rewards. I wish to see you often!
- Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!
#### Get Noticed!
- Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!
#### Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**
properties (22)
post_id20,595,936
authorutopian-io
permlinkre-dorodor-automating-openoffice-customizing-the-toolbar-improve-openoffice-automization-by-adding-a-custom-button-20171215t223606428z
categoryutopian-io
json_metadata"{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}"
created2017-12-15 22:36:06
last_update2017-12-15 22:36:06
depth1
children0
net_rshares0
last_payout2017-12-22 22:36:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,505
author_reputation152,913,012,544,965
root_title"Automating OpenOffice: Customizing the Toolbar. Improve OpenOffice Automization by Adding a Custom Button"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000