[Solved] How to get alternative text of object?

Keyboard macros or custom scripts

[Solved] How to get alternative text of object?

Postby Evgeniy » Mon Jan 20, 2020 9:14 pm

How to get alternative text of object in Basic?
Image
Last edited by Evgeniy on Tue Jan 21, 2020 5:11 am, edited 2 times in total.
OpenOffice 4.1.7 OS: Win10 x32 + Win10 x64
User avatar
Evgeniy
 
Posts: 43
Joined: Thu Jan 09, 2020 9:31 pm
Location: Russia

Re: How to get alternative text of object?

Postby FJCC » Mon Jan 20, 2020 9:37 pm

Strangely, that text is the Title property. If I enter something in that box labeled Alternative (Text Only), I can print it out with the following code. (My document only has one picture)
Code: Select all   Expand viewCollapse view
oDP = ThisComponent.DrawPage
oObj = oDP.getByIndex(0)
print oObj.Title
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7481
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: How to get alternative text of object?

Postby Villeroy » Mon Jan 20, 2020 9:39 pm

I enter "foooo" as alternative text and select the shape.
menu:Tools>Add-ins>Mri <-- Selection
I select the properties tab and do a search for "foooo" in the little search box.

Code: Select all   Expand viewCollapse view
Title                         string                         Fooooo

It is the "Title" property.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27718
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to get alternative text of object?

Postby Evgeniy » Tue Jan 21, 2020 5:10 am

Tnanks. I could not think that this is "Title" property.
OpenOffice 4.1.7 OS: Win10 x32 + Win10 x64
User avatar
Evgeniy
 
Posts: 43
Joined: Thu Jan 09, 2020 9:31 pm
Location: Russia

Re: [Solved] How to get alternative text of object?

Postby Villeroy » Tue Jan 21, 2020 7:54 am

Evgeniy wrote:Tnanks. I could not think that this is "Title" property.

That's why I looked it up.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27718
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 3 guests