Problem with importing styles from template with AutoOpen?

New Daddy
4StarLounger
Posts: 437
Joined: 05 Nov 2012, 20:02

Problem with importing styles from template with AutoOpen?

Post by New Daddy »

Although I maintain different templates for different types of writing, keeping Styles consistent over different documents attached to the same template has always been a challenge.

To solve this issue, I'm thinking of writing an AutoOpen macro (or hopefully find someone willing to write one) that will import all styles -- upon consent from the user, of course -- from the attached template when the user opens a document.

Is such macro feasible under VBA? Is there any problem with this kind of approach?

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Problem with importing styles from template with AutoOpe

Post by HansV »

There is no need to use code. You can set up a document to automatically update its styles from the attached template:
- On the Developer tab of the ribbon, in the Templates group, click Document Template.
- In the Templates tab of the Templates and Add-Ins dialog, tick the check box "Automatically update document styles".
- Click OK.
S0405.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

New Daddy
4StarLounger
Posts: 437
Joined: 05 Nov 2012, 20:02

Re: Problem with importing styles from template with AutoOpe

Post by New Daddy »

HansV wrote:There is no need to use code. You can set up a document to automatically update its styles from the attached template:
- On the Developer tab of the ribbon, in the Templates group, click Document Template.
- In the Templates tab of the Templates and Add-Ins dialog, tick the check box "Automatically update document styles".
- Click OK.
I always get confused about that function. I thought "Automatically update document styles" is to reflect style changes made in the DOCUMENT on the TEMPLATE. Your description sounds like the function of that option is actually the other way around. Maybe I was mistaken.

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Problem with importing styles from template with AutoOpe

Post by HansV »

Best wishes,
Hans

New Daddy
4StarLounger
Posts: 437
Joined: 05 Nov 2012, 20:02

Re: Problem with importing styles from template with AutoOpe

Post by New Daddy »

Thanks!