Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-13-2018, 11:23 AM
madempress madempress is offline Ungrouping/grouping to protect document that deletes bookmark rng at contentcontrolonexit procedure Windows 10 Ungrouping/grouping to protect document that deletes bookmark rng at contentcontrolonexit procedure Office 2016
Novice
Ungrouping/grouping to protect document that deletes bookmark rng at contentcontrolonexit procedure
 
Join Date: Mar 2018
Posts: 5
madempress is on a distinguished road
Default

Update: A co-worker showed me how to record macros to try to uncover the mystery. Unfortunately, nothing that was recorded works (even as its own sub procedure). The document DOES start out with everything grouped, as intended.

Recorded macro:
Code:
    'Selecting all with ctrl+A
    Selection.WholeStory
    'Hitting Developer > Controls > Ungroup
    Selection.Range.ParentContentControl.Ungroup
    'Selecting all with ctrl+A
    Selection.WholeStory
    'Developer > Controls > Group
    Selection.Range.ContentControls.Add (wdContentControlGroup)
I get more or less a loop of "Error 91: Object variable not set" and "Expected function or variable" if I try to define a range as the selection.wholestory or .ungroup the range (or selection, which I tried too). I vaguely understand why, I'm just not sure how to approach what to do here.

Still hoping for help~
Reply With Quote
 

Tags
grouping, helpme, macro in word



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ungrouping/grouping to protect document that deletes bookmark rng at contentcontrolonexit procedure Word Document Review Procedure Suggestions FedSteve Word 1 09-01-2016 11:23 PM
Ungrouping/grouping to protect document that deletes bookmark rng at contentcontrolonexit procedure Grouping or ungrouping resets Wrapping style... why? addey Word 7 02-13-2015 05:22 AM
Ungrouping/grouping to protect document that deletes bookmark rng at contentcontrolonexit procedure Pivot table grouping problem 2 tables need different grouping differentdrummer Excel 3 12-10-2013 01:19 AM
Ungrouping/grouping to protect document that deletes bookmark rng at contentcontrolonexit procedure How do I combine two different contentcontrolonexit macros? jamles12 Word VBA 2 11-12-2013 06:51 PM
Document selection procedure kennethc Word 0 09-15-2010 02:56 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:52 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