Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

Program Heading styles to increase by pt size?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Linda - 19 Oct 2006 23:01 GMT
I've got a thesis template for graduate students (so lots of users) and our
headings (levels 1-5) need to be 2 pts larger than the Normal font size. The
template is in Times New Roman 12 pt so, for now, headings are programmed to
be 14 pt.

Problem: Students are allowed to used different font styles as long as size
is similar to TNR 12. For those using Arial, font size needs to be changed to
11 pt for text; so 13 pts for headings (and some other styles). I'm trying to
find a way to eliminate having students modify the Heading 1, chapter label,
appendix label (and a couple of other) styles. Is there a way (perhaps using
field codes?) to program these styles for +2 pts versus a static point size??
Signature

Linda

Jezebel - 19 Oct 2006 23:31 GMT
There's a simpler approach. Require your students to use standard style
*names* (ie normal, heading 1, heading 2, etc). Then when you receive the
thesis from the student, apply your own template, with 'automatically update
document styles' checked.

Alternatively, create a second template, similar to the first but using
Arial instead of the god-awful TNR.

Either way, you've got the problem of students who apply manual formatting.

But why does it matter at all? Provided the paragraphs are correctly tagged,
and the theses are readable, why do you care what they look like?

> I've got a thesis template for graduate students (so lots of users) and
> our
[quoted text clipped - 16 lines]
> field codes?) to program these styles for +2 pts versus a static point
> size??
Linda - 19 Oct 2006 23:47 GMT
Thanks, Jezebel. It does matter, which is why the university has formatting
standards. Beyond that, I won't go into it here.

Your solutions, though good, don't help as my office does not "re"format the
thesis when we get it. The students need to be able to do it, which is why I
was trying to find a way to eliminate another formatting step for them. If
it's not possible, then that's life!  Thanks again.
Signature

Linda

> There's a simpler approach. Require your students to use standard style
> *names* (ie normal, heading 1, heading 2, etc). Then when you receive the
[quoted text clipped - 29 lines]
> > field codes?) to program these styles for +2 pts versus a static point
> > size??
Cindy M. - 23 Oct 2006 09:26 GMT
Hi Linda,

> Thanks, Jezebel. It does matter, which is why the university has formatting
> standards. Beyond that, I won't go into it here.
>  
> Your solutions, though good, don't help as my office does not "re"format the
> thesis when we get it. The students need to be able to do it, which is why I
> was trying to find a way to eliminate another formatting step for them.

It should be achievable using a macro (VBA), which is why you posted here, I
take it.

Something along these lines?

Sub SetRelativeFontSize()
   Dim headingFontSize As Single
   Dim doc As Word.Document
   
   Set doc = ActiveDocument
   headingFontSize = doc.Styles(wdStyleNormal).Font.Size + 2
   ChangeStyleFontSize headingFontSize, wdStyleHeading1, doc
   ChangeStyleFontSize headingFontSize, wdStyleHeading2, doc
End Sub

Sub ChangeStyleFontSize(newSize As Single, target As Variant, doc As
Word.Document)
   doc.Styles(target).Font.Size = newSize
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.