Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Macros vs. Style
What is the difference between a macro and a style? When is one superior to
the other? |
#2
|
|||
|
|||
Macros are a series of steps to be taken by Word. To some extent they mimic
keyboard and mouse input but are much more complex than that. See http://word.mvps.org/FAQs/MacrosVBA.htm. Styles are a method (the best method) of setting paragraph or character formatting. See http://addbalance.com/usersguide/styles.htm and http://addbalance.com/usersguide/basic_formatting.htm They are very different concepts. You can use macros to set styles or control formatting. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://www.mvps.org/word which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "PreciousIvy" wrote in message ... What is the difference between a macro and a style? When is one superior to the other? |
#3
|
|||
|
|||
A style is a collection of properties stored together as a unit, which
you can apply immediately to objects in your document. For example, you can use table styles (Word 2002 and later) to quickly format tables, you can use character styles to format the selected text, and you can use paragraph styles to format paragraphs in Word. For more information, see: http://www.shaunakelly.com/word/styl...sOnStyles.html. Macros use the programming language known as VBA (Visual Basics for Applications) to perform different tasks. For more, see: http://word.mvps.org/FAQs/MacrosVBA/index.htm. -- Stefan Blom "PreciousIvy" wrote in message ... What is the difference between a macro and a style? When is one superior to the other? |
#4
|
|||
|
|||
In addition to the great advice offered, I will add this:
Macros require your security setting to be set at a level that will allow them to run (preferably "Medium"). As such, some folks/companies get nervous about running macros. Even though I can create a macro that can change a variety of formatting features of a word or paragraph, I will NEVER create a macro to do anything that can already be done using Word's built-in tools. -- Bill Foley, Microsoft MVP (PowerPoint) Microsoft Office Specialist Master Instructor - XP www.pttinc.com Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/ Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm "PreciousIvy" wrote in message ... What is the difference between a macro and a style? When is one superior to the other? |
#5
|
|||
|
|||
Basically everything or at least a whole lot :-).
A macro is a named sequence of statements executed as a unit. For example the I use the following AutoOpen macro to ensure that every document I open in Word opens in the view that I want and with several annoying toolbars turned off: Sub AutoOpen() ActiveWindow.Caption = ActiveDocument.FullName With ActiveWindow.View ..Type = wdPrintView ..Zoom.PageFit = wdPageFitBestFit ..FieldShading = wdFieldShadingAlways End With With CommandBars ..Item("Reviewing").Visible = False ..Item("Mail Merge").Visible = False ..Item("Forms").Visible = False End With End Sub In Microsoft Word, a style is a collection of formatting instructions. You might apply the builtin "Title" style to title all of your papers with Arial 16PT font centerd between the margins. See: http://www.shaunakelly.com/word/styl...sOnStyles.html You can apply a style with a macro e.g., Sub ApplyBodyTextStyleToSelection() Selection.Range.Style = wdStyleBodyText End Sub You can't apply a macro with a style. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I enable macros in Office XP? | Microsoft Word Help | |||
Style problems | Microsoft Word Help | |||
Is it possible to make a new style that automatically creates a d. | Microsoft Word Help | |||
Creating a style with different formats in Word 2002 | Microsoft Word Help | |||
Macros in Normal.dot | Microsoft Word Help |