Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 08-10-2017, 02:22 AM
edwinm edwinm is offline Windows 10 Office 2016
Novice
 
Join Date: Aug 2017
Posts: 9
edwinm is on a distinguished road
Default Open en close Chapters

I've get the question to make an project document template.


Based on the selection of the project phase, it needs to close some chapters and open some others.

The idea is to reuse the document from phase1 by change the active-x selection to phase2 that will close some chapters and open some new chapters to be filed in.

This to avoid copy pasting information form phase1 document to phase2 document but simply don't close the shared chapters .

But I can't find a way to open and close the chapters by VBA even you can do this by clicking the gray arrow in front of the chapters heading .

Does anyone have an idea on fixing this?
Ore better, does someone have an small example?

Thanks for you support.

Last edited by edwinm; 08-10-2017 at 02:24 AM. Reason: missing word in sentence
Reply With Quote
  #2  
Old 08-10-2017, 03:53 AM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,326
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

So why not use a separate document for each chapter? If you need to have them all together for print purposes, they could be linked to another document via INCLUDETEXT fields.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 08-10-2017, 06:51 AM
edwinm edwinm is offline Windows 10 Office 2016
Novice
 
Join Date: Aug 2017
Posts: 9
edwinm is on a distinguished road
Default

Good question!
The reason why is simple: They don's want to have the risk of wrong copy past from data between documents. The second they want the option to look back by opening the closed chapter in stead of opening an older/other document.
Reply With Quote
  #4  
Old 08-10-2017, 03:08 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,326
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You comment about 'the risk of wrong copy past from data between documents' makes no sense to me. If you give the 'closed' one read-only protection, there is minimal risk of anything being copied to it. Besides which, how is someone going to access the content of a 'closed' chapter if it's in the same document?
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 08-11-2017, 05:09 AM
edwinm edwinm is offline Windows 10 Office 2016
Novice
 
Join Date: Aug 2017
Posts: 9
edwinm is on a distinguished road
Default

You are right, I didn't get your answer the first time. You suggested to make a document of every Chapter. My first reaction to the question was to make 4 different phase documents. In that case you will have to copy some chapters from one phase document to an onter.
The whole idea is to leave all on one document en simply collapse (close) the chapters you don't need to fill for that particular phase.

Than you still have only one document for an project instead of 21 (if I split the document on the chapters).

I thought the idea is simple, make an multiple choice field (Phase 1 till Phase 4)
Then hide/collapse all the chapters that are not needed for that Phase. Clean and simple.

Can you put me in the right direction for that?
Thanks.
Reply With Quote
  #6  
Old 08-11-2017, 05:16 AM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,326
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You can't 'collapse' content in a Word document...
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #7  
Old 08-12-2017, 01:25 PM
edwinm edwinm is offline Windows 10 Office 2016
Novice
 
Join Date: Aug 2017
Posts: 9
edwinm is on a distinguished road
Default

Thanks for your answer. Than I need to find another solution.
Good to know that this idea is a dead end.

I think the best way to zolfe the issue is to make 4 phase documents and automate the copy of content from one phase to another. Ore do you have an other direction to solve the problem.

Thanks for your support.
Reply With Quote
Reply
Please reply to this thread with any new information or opinions.

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to number chapters and sub-chapters in a few clicks? Icelandic_Boy Word 1 05-24-2016 11:33 AM
I can open an email which has characters such as [ ] in the path but if i close and reopen it i get Davederave Outlook 0 09-25-2015 07:04 AM
Open/close window in Outlook AndyDDUK Outlook 0 02-04-2013 07:07 AM
Word 2003 slow to open/close HAWJOHN Word 1 04-05-2011 06:47 AM
Lines move between close and open jsmath22 PowerPoint 0 12-15-2010 07:44 AM


All times are GMT -7. The time now is 10:06 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft