Microsoft Office Forums Word Sections - Bookmarks

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2018, 04:00 AM
ldoodle ldoodle is offline Word Sections - Bookmarks Windows 10 Word Sections - Bookmarks Office 2010 32bit
Novice
Word Sections - Bookmarks
 
Join Date: Oct 2018
Posts: 17
ldoodle is on a distinguished road
Default 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"
But what if the section number is different between documents. I looked a giving sections a name but that doesn't seem possible, so I thought about putting a bookmark and referring to that bookmark name in code.

Thanks!
Reply With Quote
  #2  
Old 11-07-2018, 04:06 AM
gmayor's Avatar
gmayor gmayor is offline Word Sections - Bookmarks Windows 10 Word Sections - Bookmarks Office 2016
Expert
 
Join Date: Aug 2014
Posts: 2,757
gmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nice
Default

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)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 11-07-2018, 05:56 AM
ldoodle ldoodle is offline Word Sections - Bookmarks Windows 10 Word Sections - Bookmarks Office 2010 32bit
Novice
Word Sections - Bookmarks
 
Join Date: Oct 2018
Posts: 17
ldoodle is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 11-07-2018, 07:04 AM
gmayor's Avatar
gmayor gmayor is offline Word Sections - Bookmarks Windows 10 Word Sections - Bookmarks Office 2016
Expert
 
Join Date: Aug 2014
Posts: 2,757
gmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nice
Default

If you are inserting them with VBA, format them as you insert them.
__________________
Graham Mayor - MS MVP (Word)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Sections - Bookmarks Deleting only all bookmarks contents not the bookmarks adilprodigy Word VBA 1 10-11-2017 01:31 PM
Word Sections - Bookmarks Word VBA - "Page left Blank" between Sections to make all Sections start on even page Cov_ATC Word VBA 9 10-27-2016 11:47 PM
Word Sections - Bookmarks Form updating Bookmarks - writes to the bookmarks multiple times PeterPlys Word VBA 13 01-14-2015 06:41 AM
Word Sections - Bookmarks 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


All times are GMT -7. The time now is 05:03 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Search Engine Optimisation provided by DragonByte SEO v2.0.37 (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft