View Single Post
 
Old 12-23-2011, 02:43 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi tinfanide,

You'd only declare each Const variable once.

IMHO, having them makes the transition from early to late binding much easier than having to change each & every occurence to the numeric value. For example, you have 6 occurrences of wdLineStyleSingle and 12 of wdLineStyleNone, plus numerous references to wdBorder types. Each of these can be handled via a single Const variable: one for wdLineStyleSingle; and one for wdLineStyleNone.

Furthermore, the code will be easier for anyone to maintain that way and, if you revert to early binding later on, you can simply add the Office reference, delete the Const variables and re-set the 'Object' declarations to what you had previously.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote