Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2016, 06:14 AM
gmayor's Avatar
gmayor gmayor is offline Bookmark content controls Windows 10 Bookmark content controls Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Instead of setting the range to the cell, set it to the range of the content control



Code:
   If .Range.Information(wdWithInTable) = True Then
      Set Rng = CCtrl.Range
      With Rng
        .Bookmarks.Add CCtrl.Title, Rng
      End With
    End If
  End With
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #2  
Old 06-12-2016, 06:20 AM
macropod's Avatar
macropod macropod is offline Bookmark content controls Windows 7 64bit Bookmark content controls Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by gmayor View Post
Instead of setting the range to the cell, set it to the range of the content control
Try that with a plain text content control or a date content control, for example, and you'll soon find it fails.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
bookmark;content control



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA for content controls ciresuark Word VBA 1 03-10-2015 03:14 PM
Calculate Age From Content Controls kintap Word VBA 10 07-02-2014 09:25 AM
Content Controls in Headers ejungk99 Word 2 06-16-2014 04:02 PM
Bookmark content controls Content Controls Sammie0Sue Word 6 11-06-2013 10:56 PM
Bookmark content controls Grouping Content Controls cksm4 Word VBA 2 03-01-2011 12:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:23 PM.


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