Solved

OpenOffice macro capability

Posted on 2013-12-11
2
470 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…

688 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