CDR Tickets

Issue Number 3883
Summary [Summaries] Add Page Numbers to Table of Contents
Created 2015-03-19 15:29:06
Issue Type Improvement
Submitted By Juthe, Robin (NIH/NCI) [E]
Assigned To Englisch, Volker (NIH/NCI) [C]
Status Closed
Resolved 2015-06-29 15:34:00
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.157170
Description

We would like to include page numbers in the table of contents at the top of summaries in MS Word. We discussed this briefly in today's meeting and decided that we will probably need to have a second macro strip out the existing table of contents (from the QC report) and add a new table of contents using the MS Word tools.

Comment entered 2015-03-19 15:33:24 by Englisch, Volker (NIH/NCI) [C]

We may want (or need) to modify the QC reports in order to create certain hooks like toc-start, toc-end, etc. which will allow a macro run in MS Word to strip out the existing TOC and replace it with one build by Word.

Comment entered 2015-05-27 11:20:17 by Englisch, Volker (NIH/NCI) [C]

As you know, we do have different sub-macros for different users.
Are we adding the page numbers to all versions of the macros? In other words, does everyone want this change?

Comment entered 2015-05-27 12:26:38 by Englisch, Volker (NIH/NCI) [C]

Is it correct that everybody is using the macros on their desktop/laptop and nobody is using them on the PROD bastion host?

Comment entered 2015-05-27 16:04:57 by Juthe, Robin (NIH/NCI) [E]

Most of us would like the ToC macro to be separate from our other summary macros, as we only plan to use it some of the time.
-Sharon, Robin J, Victoria, and Val would like to have the ability to run the ToC macro separately.
-Robin B would like to have the ToC macro added to her existing summary macro.
(If it is easier for everyone to have a separate ToC macro, this is fine.)
-Diana does not need the ToC macro.

Those of us who use the macros are using them on our desktops/laptops and not on the bastion host. Three people indicated their macros are not working properly or need help getting them set up:
-Sharon's macro is not working well for some summaries. (She will take another look to identify the specific problems.)
-Val needs help getting hers set up on her laptop.
-Diana needs to have the macro added to her new laptop. (She has it on her desktop.)

I need to check with Bonnie about her use of macros. Margaret does not use them.

Comment entered 2015-05-27 17:20:23 by Englisch, Volker (NIH/NCI) [C]

The TOC currently available has been created as part of the filtered document. The filters are creating an HTML document that doesn't know pages. We have pages available once the document has been pasted into Word. We now have three options:

  1. We're adding a TOC created by Word to the top or bottom of the already existing TOC

  2. We're replacing the existing TOC with one created by Word

  3. We're creating a TOC at the cursor position (for those users who want this macro to be separate from their global macro

The TOC created by word will not necessarily identify the same content entries.

Comment entered 2015-05-28 12:52:47 by Juthe, Robin (NIH/NCI) [E]

It is possible to combine #2 and #3, having a separate macro replace the existing TOC with a new TOC created by Word? Probably not, but I thought I'd check.

Whichever approach we go with, I think we will first need to see what Word recognizes as headings to determine whether this will be useful.

Comment entered 2015-06-01 12:51:15 by Englisch, Volker (NIH/NCI) [C]

Thinking about this a little more I'll have to say that it is possible but maybe not in all cases. It may depend on the order in which the tasks are being done. Do we want to first remove the old TOC and then add the new Word TOC or the other way around? The existing TOC can probably be identified as a paragraph or a list. I'll have to see if I'm able to distinguish the old TOC from the Word TOC so that the correct section is being removed when the macro is called in a different order.

Comment entered 2015-06-04 09:39:14 by Juthe, Robin (NIH/NCI) [E]

I don't think it matters which order this is done in (removing the old TOC vs. adding the new Word TOC).

Comment entered 2015-06-26 18:14:12 by Juthe, Robin (NIH/NCI) [E]

As we discussed today, we would like to add a separate button for adding this new TOC. We will delete the existing TOC manually. Once we see how often this is used, we can look into whether it's feasible to have a single macro delete the old TOC and add the new one.

Comment entered 2015-06-29 15:33:28 by Englisch, Volker (NIH/NCI) [C]

I've finally been able to replace an existing TOC, so I will be able to create the new Word TOC in place of the existing old TOC for each of the board managers who opted to display the TOC. For those board managers deleting the TOC as part of their personalized macros no changes will be necessary.

In addition, a new button will be created allowing the users to run the creation of a TOC at any time. The TOC will be created at the position of the cursor.

Also, as requested, I'm removing the very first entry of the TOC - the summary title itself - as part of the personalized macros.

Comment entered 2015-06-29 17:16:32 by Englisch, Volker (NIH/NCI) [C]

I did a little more testing and ran into a problem. Robin wanted to have the first line of the TOC removed, however, at the moment I'm only able to do this reliably if the title and/or the first TOC entry doesn't span over multiple lines. I will therefore not implement this change requiring the users to manually delete that first TOC entry.

Comment entered 2015-06-30 17:40:44 by Englisch, Volker (NIH/NCI) [C]

I misunderstood what needed to be done. The new Word TOC wasn't supposed to replace the existing TOC but it's supposed to be an additional option.
I reverted the changes so that no personalized macro will be affected.

Comment entered 2015-06-30 18:00:10 by Englisch, Volker (NIH/NCI) [C]

Installation Instructions

  • The changes to the macros are all in the macro file

    L:\OCPL\_Cross\CDR\WordStartup\CDR_Macros.dotm
  • copy the file to the local workstation directory

    C:\CDR\WordStartup

    Setting up Shortcut Button

  • open Word

  • right-click on the user's personalized macro button

  • select Customize Quick Access Toolbar ...

  • select Macros in the drop-down field for Choose commands from:

  • double-click on the macro Project.NewMacros.CreateWordToc

  • the macro will get copied to the right pane

  • highlight the macro in the right pane and click the button Modify... at the bottom

  • select an icon (the List symbol) and set the Display Name to Create TOC

  • click OK twice
    The new button has now been added to the top of the toolbar.

Usage

A few things to keep in mind when using the Word macros:

  • Always run the personalized macro first

  • When creating the TOC it will be inserted at the cursor location. Everything following the cursor will be pushed down

Comment entered 2015-06-30 18:01:06 by Englisch, Volker (NIH/NCI) [C]

Victoria's workstation has been setup with the new macros and she ran her macro successfully.

Comment entered 2015-07-01 15:58:44 by Englisch, Volker (NIH/NCI) [C]

These are the users that will need to have the new macro and button installed:

  • ⭐ Victoria - Laptop

  • ⭐ Diana - Desktop and Laptop

  • ⭐ Robin J.

  • ⭐ Robin B.

  • ⭐ Sharon

  • ⭐ Val

  • ⭐ Bonnie

  • ⭐ Margaret
    (⭐: Completed, ⭐: To Do)

Comment entered 2015-07-01 16:42:52 by Shields, Victoria (NIH/NCI) [E]

Please add to Bonnie's desktop as well. Thanks!

Comment entered 2015-07-01 16:48:54 by Englisch, Volker (NIH/NCI) [C]

Ahh, right. Bonnie is getting your macro, right?

Comment entered 2015-07-01 16:52:04 by Shields, Victoria (NIH/NCI) [E]

Bonnie uses my "personal" macro from the Developer tab (or maybe she has it on her toolbar?). So she would just need the new TOC macro added to her toolbar.

Comment entered 2015-09-08 16:24:31 by Englisch, Volker (NIH/NCI) [C]

Margaret is the only user left who hasn't received the new macros. She said, however, that she does not need to have these macros installed on her machine.

If you agree, Robin, we can close this issue.

Comment entered 2015-09-10 13:19:29 by Juthe, Robin (NIH/NCI) [E]

Unfortunately, the Word TOC is displaying all headings that are the 3rd level in or deeper at the same level. I'll upload a screenshot from the Genetics of Colorectal Cancer summary, which shows all headings under "Lynch syndrome" has being of the same level.

Comment entered 2015-09-11 16:49:03 by Englisch, Volker (NIH/NCI) [C]

As discussed in our status meeting, please go ahead and create a new ticket to investigate if modifying the new macro template would fix the problem.

Comment entered 2015-09-18 11:58:02 by Englisch, Volker (NIH/NCI) [C]

As discussed at our status meeting:
We're closing this ticket once a new ticket has been created to address the display of the lower level headings.
The ticket has been created and is linked to this.

I'm closing this ticket.

Attachments
File Name Posted User
screenshot-1.png 2015-09-10 13:19:49 Juthe, Robin (NIH/NCI) [E]

Elapsed: 0:00:00.001417