![]() |
#1
|
|||
|
|||
![]()
Hi,
Is it possible to make a section a bookmark? What I need to do is change a style for an entire section. This may sound obvious as I could refer to the section by number: Code:
ActiveDocument.Range.Sections(2).Range.style = "StyleName" Thanks! |
#2
|
||||
|
||||
![]()
You can certainly bookmark a complete section, just as you can bookmark other pieces of text, but if you are running code on a piece of text that has variable numbers of sections, do you not have another means of identifying which section you wish to apply paragraph formatting? What determines whether the section needs this format?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
![]()
I think you're right, but I was hoping to not have to highlight loads of text to make the whole lot a bookmark, rather just make the whole section a bookmark. If you get what I mean.
These are external documents from many sources, so unfortunately I have no single identifier to check for, so my initial idea was wrap what needs to be changed with section breaks but then I realised there could be existing sections elsewhere. Thanks for your help. |
#4
|
||||
|
||||
![]()
If you are inserting them with VBA, format them as you insert them.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Cov_ATC | Word VBA | 10 | 11-28-2021 03:41 PM |
![]() |
adilprodigy | Word VBA | 1 | 10-11-2017 01:31 PM |
![]() |
PeterPlys | Word VBA | 13 | 01-14-2015 06:41 AM |
![]() |
dnc | Word VBA | 4 | 05-10-2013 04:58 PM |
word 2007 bookmarks | Dawn | Word | 0 | 07-14-2009 01:00 PM |