Link to home
Start Free TrialLog in
Avatar of Luis Diaz
Luis DiazFlag for Colombia

asked on

MS Office VBA: transfer styles from one file to another

Hello Experts,

I have one docx document with some styles that I want to transfer to my Normal.dotm file.
Do you know if there is a Word VBA procedure that allows me to specify the style that I want to transfer to my Normal.dotm.

Example: SourceFile="C:\Doc" StyleName="CuztomizedStyle" TargetFile="C:\Normal.dotm.

The aim is to have CuztomizedStyle at Normal.dotm.

It would be great if I can specify multiple StyleNames, if not I will used as function and call it based on Styles number to transfer.
Example:
Sub TransferStyle(SourceFile,StyleName,TargetFile)

The final aim is to add it to my personal add-in and used whenever I want.

Thank you for your help.
SOLUTION
Avatar of Paul Sauvé
Paul Sauvé
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Luis Diaz

ASKER

Hi John,
You are right. I am going to follow your procedure instead of having a macro.
in passing, my short clip shows the same solution ;-)
Ok, Désolé Paul. Merci.
Ok, Sorry Paul. Thank you.
don't worry about it, i do this for fun!