Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2008

Tip: Looking for answers? Try searching our database.

Copy one single style from another document or template

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vbaNOOB - 23 Jul 2008 08:45 GMT
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
Cindy M. - 23 Jul 2008 11:19 GMT
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 :-)
vbaNOOB - 24 Jul 2008 09:26 GMT
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

> Hi =?Utf-8?B?dmJhTk9PQg==?=,
>
[quoted text clipped - 12 lines]
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
Cindy M. - 24 Jul 2008 15:47 GMT
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 :-)
vbaNOOB - 25 Jul 2008 05:21 GMT
Thanks alot. You are very helpful

> Hi =?Utf-8?B?dmJhTk9PQg==?=,
>
[quoted text clipped - 12 lines]
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.