[Solved] Copying/Importing specific styles

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
slang4201
Posts: 35
Joined: Wed Nov 12, 2008 9:21 pm

[Solved] Copying/Importing specific styles

Post by slang4201 »

Hi All,

I have a need to move specific styles from one document to another. I looked at the ImportStylesFromURL() method, but didn't see a way to limit the styles imported to specific ones (note: not style families like paragraph styles, etc., I need to copy/import specific, named styles).

Is there a way to do this?

Thanks, and have a great day!

Steve
Last edited by slang4201 on Tue Jan 27, 2009 7:16 pm, edited 1 time in total.
----------------
-Steve
OOo 3.1 on Ms Windows XP
slang4201
Posts: 35
Joined: Wed Nov 12, 2008 9:21 pm

Re: Copying/Importing specific styles

Post by slang4201 »

I don't think a method for moving specific styles exists. I ended up with a function that does a "firehose" copy of all the styles in the source document, then trimming the ones I didn't want from the new document. Not as efficient, but it does the job.
----------------
-Steve
OOo 3.1 on Ms Windows XP
Post Reply