[Solved] Insert Picture set preferences

Discuss the word processor
Post Reply
DavidMWright
Posts: 36
Joined: Thu May 22, 2014 10:45 am

[Solved] Insert Picture set preferences

Post by DavidMWright »

When inserting numerous pictures into a text document it's really tedious having to set all the parameters individually for each picture, even though they're the same for every picture. Is there any way to set the preferences so they're inserted with the required parameters. For example, I always want 'Anchor to page' 'Page wrap' and 'space to text' set to 0.2".
Can this be done?
Thanks
David
Last edited by MrProgrammer on Mon May 25, 2020 11:28 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Neo Office 2017.33 on Mac OS10.12.6
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Insert Picture set preferences

Post by RoryOF »

I can't help with the details of that, but if using pictures be aware that OpenOffice can suddenly decide to lose them. You should use the timed/dated backup extension. You can download it from
viewtopic.php?p=406045#p405921

Note that you must invoke it separately using its button; it does not replace the standard save mechanism.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
JeJe
Volunteer
Posts: 2779
Joined: Wed Mar 09, 2016 2:40 pm

Re: Insert Picture set preferences

Post by JeJe »

If that extension doesn't do what you want, a simple macro can loop through all the pictures and set some values:

For safety test on a document copy.

Code: Select all


Sub SetPictureValues
en =thiscomponent.graphicobjects.createenumeration

do until en.hasmoreelements = false
p = en.nextelement
with p
c = 0.2 * 2.54 * 1000
.LEFTMARGIN =c
.TOPMARGIN =c
.RIGHTMARGIN = c
.BOTTOMMARGIN = c
.anchortype = com.sun.star.text.TextContentAnchorType.AT_PAGE
.textwrap = com.sun.star.text.WrapTextMode.PARALLEL
end with
loop

End Sub


Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Insert Picture set preferences

Post by John_Ha »

See [Tutorial] Some useful hints on using images for a discussion on how best to handle images in Writer.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Insert Picture set preferences

Post by Villeroy »

Pictures are inserted with page frame style "Graphics". You can modify that style in order to modify all pictures and the pictures to come.
Last edited by Villeroy on Sat May 16, 2020 6:48 pm, edited 1 time in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
DavidMWright
Posts: 36
Joined: Thu May 22, 2014 10:45 am

Re: Insert Picture set preferences

Post by DavidMWright »

Thanks VIlleroy, but where do I find page style "graphics"? I'm using Neo Office - the Mac version - maybe this is different?
Thanks
David
Neo Office 2017.33 on Mac OS10.12.6
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Insert Picture set preferences

Post by Villeroy »

Sorry, it is a frame style.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Insert Picture set preferences

Post by RoryOF »

And you can find Frame Styles by /Format /Styles and Formatting (or F11 key) and clicking on the 3rd icon from the left.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply