Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to make a document that is mainly comprised of a list.

Each list item summarizes the contents of a linked Excel spreadsheet that is currently attached at the end of the document; what I'd like to do is copy each spreadsheet section and paste-special it under the relevant list item and either hide or show it based on the click of a hyperlink, so that I can distribute this document to individual users who can display only those sections relevant to their department and print a customized version of the total report.

Is this possible, or am I trying to use Word for something I'd really need to use HTML/CSS/Javascript for?

share|improve this question
up vote 3 down vote accepted

I've done this type of document for a large insurance company. We did it by creating custom Word forms.

On the form you create some mechanism for the user to choose their desired document sections. A listbox or series of check boxes would do. When the user fills our their choices, they click a button on the form.

Next you have to write some VBA code. The code either, creates the document dynamically based on their choices or hides the unwanted sections. You can add bookmarks to the document for each segment, then find the bookmark in the document, then set the font to hidden.

It was at least 8 years ago that I did this. Today I'd probably use Visual Studio 2010 and create an Excel document using the Office tmplates.

I'd guess that you will have to write some VBA or .NET code to solve this problem.

share|improve this answer

You could use the Word More Add-in ($19.99 with free trial), which adds expandable segments capability to Microsoft Word documents, segments that can also be collapsed/expanded via a VBA macro. A demo Word document is also available for download.

For a discussion of the product see this article :
Insert Collapse / Expand Options In Word Document - More Add-in.

share|improve this answer

This may be possible with VBA, however I doubt it.

MS Word is a WYSIWYG document editor and is not intended to have a dynamically modifiable display of data. You are correct that web based solutions are better suited for this. You can create a custom webpage/site using HTML,JS, and CSS to accomplish this. However, there many prebuilt web apps for this. There are a lot of exisiting wiki, knowledge base, etc apps already out there that are free to use. This site is free and open source and I think would be better suited to the task than word is.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .