Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

OpenOffice macro capability

Posted on 2013-12-11
2
Medium Priority
?
487 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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
As freelancing is becoming more and more common in the tech industry, certain obstacles are proving to be a challenge to those who are used to more traditional, structured employment. This article is meant to help identify such obstacles and offer a…
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…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

618 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