CDR Tickets

Issue Number 3352
Summary [Summaries] Change to MS Word Macro to Remove TOC Links
Created 2011-05-05 11:42:03
Issue Type Improvement
Submitted By Juthe, Robin (NIH/NCI) [E]
Assigned To Englisch, Volker (NIH/NCI) [C]
Status Closed
Resolved 2011-08-10 23:36:02
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.107680
Description

BZISSUE::5045
BZDATETIME::2011-05-05 11:42:03
BZCREATOR::Robin Juthe
BZASSIGNEE::Volker Englisch
BZQACONTACT::William Osei-Poku

I'm not sure if I picked the right component here, but we're wondering if we could add another change to the Word Macro we currently use to format the summaries in MS Word in order to remove the hyperlinks from the Table of Contents. While these links are helpful when we're reviewing the summary in HTML, they do not work when the report is converted to Word and are distracting.

Comment entered 2011-05-10 10:24:34 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-05-10 10:24:34
BZCOMMENTOR::Volker Englisch
BZCOMMENT::1

(In reply to comment #0)
> ... in order to remove the hyperlinks from the Table of Contents.

I'm wondering what exactly you mean by "removing the hyperlinks". Is this meant to still display the TOC but change the formatting so that the text is displayed in black color instead of blue (and possibly without underline) or would you like the TOC to be removed as a hole (in which case we may need to discuss exactly what else should be removed (i.e. the horizontal line, the "Treatment - HP" heading, etc.).

Comment entered 2011-05-10 10:26:52 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2011-05-10 10:26:52
BZCOMMENTOR::Robin Juthe
BZCOMMENT::2

(In reply to comment #1)
> I'm wondering what exactly you mean by "removing the hyperlinks".

I'd like to still display the TOC but in black, not-underlined text. It's confusing to Board members if it still appears like links but doesn't bring them anywhere.

Comment entered 2011-05-10 10:33:07 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-05-10 10:33:07
BZCOMMENTOR::Volker Englisch
BZCOMMENT::3

I agree that it's a little confusing but I'd like to add that there are more links in the document (Citation links, Summary Links) which are behaving the same way as the TOC links.
At this point we only want to change the TOC links, right?

Comment entered 2011-05-12 09:50:14 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2011-05-12 09:50:14
BZCOMMENTOR::Robin Juthe
BZCOMMENT::4

Right, only the TOC links. It's helpful to know the other links (SummaryRefs, SummaryFragRefs, GlossaryRefs) have been made throughout the summary, even if we can't link to them, and the Citation links are useful because they allow us to hover over the number and see the bibliographic info.

Of course, we might change our minds at some point in the future... ;-)

Comment entered 2011-06-17 11:28:35 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-06-17 11:28:35
BZCOMMENTOR::Volker Englisch
BZCOMMENT::5

I have a macro working that allows us to remove the hyperlinks of the TOC for summaries. However, it is less than perfect and has several flaws:
a) It only works if the section "Changes to This Summary..." exists because
this is the trigger to stop removing links. All links above this TOC
item will be removed.
b) Corollary - it only works with Summaries.
c) If it is applied more than once to the same document ALL remaining links
will be removed.
d) If the section title "Changes to This Summary..." changes, the macro will
have to be changed as well.

I know that some of these items could be resolved but I have limited experience
with VB at this point (though learning quickly as we speak) and don't think
it's worth it to spend too much time on this issue.

One more question: Should this macro be separate from the existing one or should it always be called when the Header/Footer macro runs?

Comment entered 2011-06-20 16:57:38 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2011-06-20 16:57:38
BZCOMMENTOR::Robin Juthe
BZCOMMENT::6

(In reply to comment #5)
> I have a macro working that allows us to remove the hyperlinks of the TOC for
> summaries. However, it is less than perfect and has several flaws:
> a) It only works if the section "Changes to This Summary..." exists because
> this is the trigger to stop removing links. All links above this TOC
> item will be removed.
> b) Corollary - it only works with Summaries.
> c) If it is applied more than once to the same document ALL remaining links
> will be removed.
> d) If the section title "Changes to This Summary..." changes, the macro will
> have to be changed as well.
> I know that some of these items could be resolved but I have limited experience
> with VB at this point (though learning quickly as we speak) and don't think
> it's worth it to spend too much time on this issue.
> One more question: Should this macro be separate from the existing one or
> should it always be called when the Header/Footer macro runs?

We can definitely live these these things - and I agree, it's not worth it to spend too much time on this.

It would be great if this could be combined with the header/footer macro to all run at once.

Comment entered 2011-06-21 11:16:15 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-06-21 11:16:15
BZCOMMENTOR::Volker Englisch
BZCOMMENT::7

The new and modified macros are ready but will have to be copied to each user's machine individually. I'm happy to do this for everyone but for those who like the adventure here are the instructions (using Office 2007):

a) Open MS-Word
b) Click on the 'Developer' tab
c) Click the 'Macros' icon
d) Select 'HeaderFooter' and click 'Edit'
e) At the end of the macro insert the following lines between the two lines
Selection.HomeKey Unit:=wdLine
and
End Sub

' Removing the TOC Links
RemoveTOCHyperlinks
f) Open the following file (with Notepad, WordPad, etc.)
L:\OCE_CROSS\CDR\temp\RemoveTOCHyperlinks.bas
g) Copy the content of the file and paste is below the line
End Sub
of the HeaderFooter macro
h) Click 'Save'
i) Exit the macro editor
File --> Close and Return to Word

Now you should be able to run the HeaderFooter macro on a Summary to format and remove the TOC links at the same time.

Comment entered 2011-06-21 14:16:26 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-06-21 14:16:26
BZCOMMENTOR::Volker Englisch
BZCOMMENT::8

So far I've updated the macros for
Robin H.
Sharon
Victoria

Comment entered 2011-07-01 18:38:14 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-07-01 18:38:14
BZCOMMENTOR::Volker Englisch
BZCOMMENT::9

Robin noticed two additional problems:
a) If the 'Changes to This Summary' section was missing all links were
removed. (We knew this would be the case.)
b) If a TOC entry was proposed the text would be left in blue color and
underlined (though the link itself was removed).

I've created a new version of the macro which now does not depend on the
existence of the 'Changes to This Summary' section. However, it still depends
on the fact that the TOC and the following text are using different display font.
Also, the color of the TOC entries is now black regardless if the entry is approved or proposed.

This has been implemented and tested on Robin's machine.

I will need to copy this to the board managers machines after my vacation.

Comment entered 2011-07-27 16:50:54 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-07-27 16:50:54
BZCOMMENTOR::Volker Englisch
BZCOMMENT::10

The macros have been installed on the machines for
Diana
Sharon
Robin B
Robin H
Victoria

I still need install it for
Val
Margaret

I'm guessing that Deb won't need this or should I install it on her machine, too?

Comment entered 2011-07-29 18:07:37 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-07-29 18:07:37
BZCOMMENTOR::Volker Englisch
BZCOMMENT::11

The macros have been installed on the machines for
Diana
Sharon
Robin B
Robin H
Victoria
Val

I still need to install it on Margaret's machine.

Comment entered 2011-08-04 17:49:19 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-08-04 17:49:19
BZCOMMENTOR::Volker Englisch
BZCOMMENT::12

As discussed during today's status meeting Margaret doesn't need these Word macros installed on her machine which means that everybody who needs it does have it now.

Closing issue.

Comment entered 2011-08-04 18:12:20 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2011-08-04 18:12:20
BZCOMMENTOR::Robin Juthe
BZCOMMENT::13

(In reply to comment #12)
> As discussed during today's status meeting Margaret doesn't need these Word
> macros installed on her machine which means that everybody who needs it does
> have it now.
> Closing issue.

Unfortunately, Sharon JUST came to me with a request related to this macro. She is disappointed that each of the section headings within the summary are made the same size as the surrounding text when we run the macro (rather than being sized proportionately to their level in the document).

I don't think this is a new effect of this TOC link addition but she would prefer to have the subheadings maintain the various sizes that they have when downloaded in MS word. Is this feasible?

Comment entered 2011-08-05 10:10:04 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-08-05 10:10:04
BZCOMMENTOR::Volker Englisch
BZCOMMENT::14

(In reply to comment #13)
> I don't think this is a new effect of this TOC link addition

The situation is this:
We had the Header/Footer link which is, in addition to adding the Header and footer, setting the font type and font size and we created the new RemoveTOCLinks macros. This new macro does not make any changes to the font type or font size of the document. However, we've added the RemoveTOCLinks macro to be called by the Header/Footer macro so that the users won't have to run two macros after the conversion but one.

Did Sharon ever use the Header/Footer macro before? If she did she would probably have noticed and reported this "feature".

Since the Header/Footer macro had originally been requested by Victoria I would want to make sure that everyone is OK to have the macro modified. Other options are:
1) Assuming that Sharon never used the Header/Footer macro before she may not
really need to use it now but only did in order to run the RemoveTOCLinks
macro. If all she needs to run is the RemoveTOCLinks macro we could
a) Create an additional button for her to only run the RemoveTOCLinks
b) Show her how to run only the RemoveTOCLinks macro from the menu
2) We can make the change to the Header/Footer macro if everyone agrees.
3) Recognizing that every board manager is preparing their documents slightly
differently we could create individualized macros.
I often hear things like "Oh, I don't like this or that but I just manually
change is after I ran the macro". It would probably save a lot of time
collectively if we'd give Victoria, for instance, a document with a 12 point
font while we're giving Diana a 8 point font.

If we'd go with option (3) we should probably ask every board manager what repetitive changes they would like to have automated and create those as a macro (if that's possible) that would make most sense.

In short, I think this is a new issue and not so much a problem of the macro we've just created but I don't mind working using this reopened issue.

Let me know what you think would make the most sense in fixing Sharon's issue?

Comment entered 2011-08-10 23:35:28 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2011-08-10 23:35:28
BZCOMMENTOR::Robin Juthe
BZCOMMENT::15

(In reply to comment #14)
> Let me know what you think would make the most sense in fixing Sharon's issue?

Customized macros may actually save us time in the long run! I will confer with everyone to see who does what to the documents and then open another issue if we have changes or additional macros to develop. So, I'm re-closing this issue. Thanks.

Comment entered 2011-08-10 23:36:02 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2011-08-10 23:36:02
BZCOMMENTOR::Robin Juthe
BZCOMMENT::16

Closed.

Elapsed: 0:00:00.000621