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 / November 2005

Tip: Looking for answers? Try searching our database.

Dividing sections - Formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Srini - 21 Nov 2005 21:38 GMT
Hello,

I have  a dot file with content of 2 pages. I have divided these 2
pages into 3 sections from Menubar -> Insert -> Break -> Section break
Types -> Continuous

Now what i need to do is to BOLD the content in the second section. How
can i do this???
Tried this option but not working...
ActiveDocument.sections(2).range.bold =  true

If the document is having two sections only, then this is working
ActiveDocument.sections.first.range.bold = true or
ActiveDocument.sections.last.range.bold = true

Please help me.

Thanks
Srini
Charles Kenyon - 21 Nov 2005 23:08 GMT
It may seem intrusive to ask, but _why_ are you using section breaks to
divide your document? Continuous section breaks can be very helpful but they
are often the cause of multiple headaches as well. If it is just to do this
formatting, I would guess that Styles would be a better method.
Signature

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://word.mvps.org/FAQs/ 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.

> Hello,
>
[quoted text clipped - 15 lines]
> Thanks
> Srini
Srini - 21 Nov 2005 23:53 GMT
Charles,

Right now there is tons of code behind the scenes which makes the
content unbold based on x,y,z conditions...i donna touch that so
..simply the content which i want to make is kep in one sections and
bold it.

I do admit its a headache but it is a temp solution.

Thanks for your help

Regards,
Srini
Charles Kenyon - 22 Nov 2005 04:27 GMT
Be aware that bold and italics are both toggle formatting. That is, you can
end up switching partially bolded text so that the text which was not bold
now is, and that which was bold, is now plain.

One thought that comes to mind would be to run the following code for your
document to make sure you don't have more sections than you think you do.
That is one of the headaches you get from continuous section breaks applied
to small portions of a document. It could be that you have a section with no
text.

MsgBox "Sections in this document = " & ActiveDocument.Sections.Count
' gives number of sections - or

Sub WhichSection()
'   Adapted from http://word.mvps.org/FAQs/MacrosVBA/GetIndexNoOfPara.htm
   MsgBox "The cursor is in section: " & _
       ActiveDocument.Range(0,
Selection.Sections(1).Range.End).Sections.Count
End Sub

Signature

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://word.mvps.org/FAQs/ 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.

> Charles,
>
[quoted text clipped - 9 lines]
> Regards,
> Srini
 
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.