Solved

OpenOffice macro capability

Posted on 2013-12-11
2
450 Views
Last Modified: 2013-12-15
I'm contemplating using Open Office for a particular purpose that would require macros, so I have some basic questions (hoping to shorten the research time), starting with:

Can a Basic macro in a spreadsheet access and control shapes in a drawing?  (This is something that can be done in MS Office VBA.)   And if so, where might I start to learn about that?

Any pointers on this would be appreciated.

Thanks!
0
Comment
Question by:codequest
2 Comments
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 500 total points
ID: 39713225
Without knowing more detials it is hard to say it will do the same as MS Office.

Yes you can draw shapes in Calc


Install MRI and learn about the concept of services and interfaces

The spreadsheet document supports several services to create new instances of various shape types.

    AvailableServiceNames in MRI wrote:com.sun.star.drawing.AppletShape
    com.sun.star.drawing.BitmapTable
    com.sun.star.drawing.CaptionShape
    com.sun.star.drawing.ClosedBezierShape
    com.sun.star.drawing.ClosedFreeHandShape
    com.sun.star.drawing.ConnectorShape
    com.sun.star.drawing.ControlShape
    com.sun.star.drawing.CustomShape
    com.sun.star.drawing.DashTable
    [ and more ]

Open in new window


Each sheet has one draw page.
To the the draw page you can add shapes.

Code snippet recorded while browsing MRI:
    Sub Snippet( oInitialTarget )
      Dim oSheets As Object
      Dim oObj1 As Object
      Dim oDrawPage As Object

      oSheets = oInitialTarget.Sheets
     
      oObj1 = oSheets.getByName( "Sheet1" )
      oDrawPage = oObj1.getDrawPage()
    End Sub

Open in new window





Here are some pointers as requested:

OpenOffice.org BASIC Programming Guide
https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide

VBA : Compatibility between OpenOffice.org Basic and VBA relates to the OpenOffice.org Basic language as well as the runtime library. The OpenOffice.org API and the Dialog Editor are not compatible with VBA (standardizing these interfaces would have made many of the concepts provided in OpenOffice.org impossible).

Calc Examples
Spreadsheet  code examples

Andrew Pitonyak's OpenOffice Macro Information
0
 
LVL 2

Author Closing Comment

by:codequest
ID: 39720389
helpful tips and links
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Export email account from Exchange 2010 11 204
How can I listen to my e-books on my laptop? 6 103
Adobe Acrobat Pro: how to copy style? 2 105
Problem to cell option 1 28
Microsoft Office 2010 is Microsoft's latest edition to their office productivity collection. It "promises to include rich and powerful new ways to deliver your best work". So to start off, I have to say that I'm slightly disappointed... That bei…
This article will shed light on the latest trends when it comes to your resume building needs. For far too long, the traditional CV format has monopolized the recruitment market.
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question