Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2015, 04:15 PM
ChrisDevrell ChrisDevrell is offline Add a bookmark to the Header using Word VBA Windows 7 32bit Add a bookmark to the Header using Word VBA Office 2010 32bit
Novice
Add a bookmark to the Header using Word VBA
 
Join Date: May 2012
Location: Southampton
Posts: 3
ChrisDevrell is on a distinguished road
Default

Thanks Paul

That works a treat.

Inserting a bookmark was a general idea and I wanted to make it work for inserting autotext without damaging the header and your code works the same there:

Dim Rng As Range
Set Rng = ActiveDocument.Sections(1).Headers(wdHeaderFooterP rimary).Range
Rng.Collapse wdCollapseStart
ThisDocument.AttachedTemplate.AutoTextEntries("_Cl assificationStatus").Insert RichText:=True, where:=Rng

Thanks again
Chris.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a bookmark to the Header using Word VBA Moving Selected Items from a Multiselect Listbox on a userform to a bookmark in Word marksm33 Word VBA 3 01-15-2015 07:55 PM
Add a bookmark to the Header using Word VBA Getting mult resps. selected in listbox to concatenate & paste at a bookmark in Word marksm33 Word VBA 3 01-15-2015 05:59 PM
Adding field in word in header in a bookmark in table with Excel vba Late Binding Hdr Excel Programming 6 02-11-2013 02:58 AM
Add a bookmark to the Header using Word VBA Open header to insert text into bookmark Amapola188 Word VBA 3 07-12-2012 05:16 PM
Add a bookmark to the Header using Word VBA [Word 2007] How to hyperlink directly another word file chapter/paragraph/bookmark? LeeFX Word 4 05-05-2011 05:53 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft