Copy one single style from another document or template

V

vbaNOOB

Hi All,

I want to copy one single style document A to document B.
I've found some article to update all style from the attached template to
the activedocument. But I need the logic to copy one single style.

Actually, I can copy the text from the source document with that particular
style and copy it to the target document. However, I would like not to touch
or change the text within the target document.

Is that any way that I could do it ? Many Thanks
 
C

Cindy M.

Hi =?Utf-8?B?dmJhTk9PQg==?=,
I want to copy one single style document A to document B.
I've found some article to update all style from the attached template to
the activedocument. But I need the logic to copy one single style.
Look up the Application.Organizer. That will let you copy single styles
between documents.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
V

vbaNOOB

Hi,

Thanks for your reply. I'm quite new to vba and programming
I do find a object called WdOrganizerObject, but I dont know how to use it.

Could you please give more hint on this? Many Thanks
 
C

Cindy M.

Hi =?Utf-8?B?dmJhTk9PQg==?=,
I do find a object called WdOrganizerObject, but I dont know how to use it.
Something like this

Application.OrganizerCopy Source:="PathToDoc1" Destination:="PathToDoc2",
Name:="NameOfStyle", Object:=wdOrganizerObjectStyles

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
V

vbaNOOB

Thanks alot. You are very helpful

Cindy M. said:
Hi =?Utf-8?B?dmJhTk9PQg==?=,

Something like this

Application.OrganizerCopy Source:="PathToDoc1" Destination:="PathToDoc2",
Name:="NameOfStyle", Object:=wdOrganizerObjectStyles

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)


This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top