Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

3 Answers 3

up vote 2 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.