#1   Report Post  
PreciousIvy
 
Posts: n/a
Default Macros vs. Style

What is the difference between a macro and a style? When is one superior to
the other?
  #2   Report Post  
Charles Kenyon
 
Posts: n/a
Default

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   Report Post  
Stefan Blom
 
Posts: n/a
Default

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   Report Post  
Bill Foley
 
Posts: n/a
Default

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   Report Post  
Greg
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enable macros in Office XP? Richard Microsoft Word Help 3 December 8th 04 02:47 AM
Style problems Larry Microsoft Word Help 1 December 2nd 04 12:15 PM
Is it possible to make a new style that automatically creates a d. Alexa Microsoft Word Help 1 November 30th 04 04:46 PM
Creating a style with different formats in Word 2002 puzzled Microsoft Word Help 1 November 29th 04 07:52 PM
Macros in Normal.dot BenJ Microsoft Word Help 3 November 26th 04 11:08 AM


All times are GMT +1. The time now is 07:45 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"