#1
|
|||
|
|||
Word Sections - Bookmarks
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 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word VBA - "Page left Blank" between Sections to make all Sections start on even page | Cov_ATC | Word VBA | 10 | 11-28-2021 03:41 PM |
Deleting only all bookmarks contents not the bookmarks | adilprodigy | Word VBA | 1 | 10-11-2017 01:31 PM |
Form updating Bookmarks - writes to the bookmarks multiple times | PeterPlys | Word VBA | 13 | 01-14-2015 06:41 AM |
selecting ms word bookmarks using vba | dnc | Word VBA | 4 | 05-10-2013 04:58 PM |
word 2007 bookmarks | Dawn | Word | 0 | 07-14-2009 01:00 PM |