If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Moving Styles in a script
I want to give my users a mechanism for moving styles into the current
document. The styles and macros exist in a document located in the startup directory. So, the styles in this document are not available to the user. So, I need a scripting method for the user to apply a style from the startup.dot to the current documnet (based on normal as cretaed by Microsoft). I would like it to work like this. A user positions the cursor within a paragraph, clikcs on a toolbar button which initiates the macro. The macro should somehow copy the style into the current document and apply it to the selection. I also need a macro for just applying the bullet style to the current style of a paragraph. Same method to initiate. Thanks for the help, Bart |
#2
|
|||
|
|||
May I tactfully recommend against this? Word has quite a lot of
functionality already for organising and using styles. What you describe is partly a reinvention of the wheel; and somewhat at odds with the way Word works. You're also lumbering yourself with a significant training and support task. 1. Word users expect their styles to come from templates. 2. Word already has the Organizer for copying styles from one document (including an add-in) to another. 3. Word already has a way to apply styles to the selection. This is already complex beyond the ability of many users, and you're talking about adding to it. Think through what happens with your scenario: user applies a style from your add-in. That style is now defined in their document. Then they modify that style. Then they apply the same style from the add-in to another selection in their document. You can't have two styles with the same name, so either the previous paragraph will get re-formatted contrary to the user's wishes; or the selected paragraph will be formatted other than as expected. Either way, you'll get the blame. Just design some good templates. "Bart Teems" wrote in message ... I want to give my users a mechanism for moving styles into the current document. The styles and macros exist in a document located in the startup directory. So, the styles in this document are not available to the user. So, I need a scripting method for the user to apply a style from the startup.dot to the current documnet (based on normal as cretaed by Microsoft). I would like it to work like this. A user positions the cursor within a paragraph, clikcs on a toolbar button which initiates the macro. The macro should somehow copy the style into the current document and apply it to the selection. I also need a macro for just applying the bullet style to the current style of a paragraph. Same method to initiate. Thanks for the help, Bart |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding styles and fonts to Word 2000 | Bob | New Users | 1 | August 14th, 2004 06:14 PM |
How to correct and/or add styles to an existing document? | Peter Sale | Formatting Long Documents | 5 | July 25th, 2004 04:49 AM |
How to correct and/or add styles to an existing document? | Peter Sale | General Discussion | 5 | July 25th, 2004 04:49 AM |
update styles per new template | Ellen Finkelstein | General Discussion | 10 | July 9th, 2004 05:29 PM |
Customized styles unexpectedly lose the formatting settings | Sherry | General Discussion | 2 | June 28th, 2004 05:37 PM |