Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index

Hi Piet,

your makro is ingenious, short and effective, it does the job, than you very 
much, I am happy.


Am Mittwoch, 4. Mai 2016 schrieb Piet van Oostrum:
Walther Koehler wrote:
 > Am Mittwoch, 4. Mai 2016 schrieb Piet van Oostrum:
 > > Walther Koehler wrote:
 > >  > Thank you.
 > >  > Your procedure is principally what I need.
 > >  > However, quite complicated for routine work.
 > >  >
 > >  > Walther
 > >
 > > The first part (replacing hidden text with colored text) could be done
 > > with a script.
 > yes, and the whole procedure could be packed in a basic makro.
 > The script can be called by a shell command within a makro, the replace
 > functions realized with dispatcher commands.
 > Let us try it.
 > Walther

Even simpler:

Here is a Basic macro that just walks through the document, and deletes all
hidden text. No unzipping, editing, etc. It just works inside the ODT
document in LO.

It only considers normal plain text, i.e. not inside tables, sections,
frames, footnotes, etc. If you want that, these have to be specially coded.

REM  *****  BASIC  *****

Sub Main

Dim oEnum                   '
Dim oPar
Dim oSecEnum                '
Dim oParSection

oEnum = ThisComponent.Text.createEnumeration()
Do While oEnum.hasMoreElements()
              oPar = oEnum.nextElement()
              If oPar.supportsService("") Then
                              oSecEnum = oPar.createEnumeration()
                              Do While oSecEnum.hasMoreElements()
                                              oParSection = oSecEnum.nextElement()
                                              If oParSection.TextPortionType = "Text" AND 
Then oParSection.setString("")
                                              End If

              End If

End Sub
Piet van Oostrum <>
PGP key: [8DAE142BE17999C4]

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.