Archive for the ‘Software’ Category

h1

Word: Quick way to deal with Track Changes

June 4, 2019

If you receive your Word document back from your editor and it’s peppered with track changes (Review tab > All Markup view), you might think you only have two choices:

  • accept them all at once without really checking them (Review tab > Accept > Accept All Changes), but I would only advise this if it’s a short document where there are just a few changes that you’ve agreed to accept, or documents where you totally trust the editor’s judgement; in most cases, this is NOT what you should do
  • accept them one at a time (Review tab > Accept > Accept and Move to Next OR right-click on each change and Accept or Reject the change, then click the Next button in the Changes group on the Review tab). On a document with thousands of changes, this could take a LONG time.

(If you’re going to reject them, then the same as above but choose the Reject option.

However, there is another way to quickly accept/reject a whole group of changes at once.

  1. Go to the Review tab.
  2. Switch to No Markup view.
  3. Read a paragraph or two.
  4. You now have two choices:
    • If you’re happy with the editing, select just that paragraph (or two), then under Review tab > Accept > click Accept Change (DO NOT ‘Accept All Changes’). This accepts all the changes in that selection only.
    • If you’re not happy with how it’s edited, switch back to All Markup view, and accept/reject the individual changes in that paragraph as you normally would.
  5. Repeat steps 2 to 5 for every paragraph/small subset of paragraphs for the rest of the document.

Further resources:

If you’re not sure how to deal with track changes, this overview and these two YouTube videos will help:

[Links last checked June 2019]

h1

Word: Macros to switch from No Markup to All Markup views

June 2, 2019

I worked on a 350p technical report the past two weeks, and was forever switching between No Markup (Final) view and All Markup (Final: Show Markup [i.e. track changes]) view. Moving the mouse to do that got old pretty quick, even though I have that control on my Quick Access Toolbar. What I needed was a keyboard command or two to flip between views. Well, I couldn’t find one! I couldn’t even find the command in the list of all commands. That’s not to say one doesn’t exist—just that I couldn’t find it. Update 5 June 2019: Angela, one of this blog’s subscribers, had a solution that she shared with me. I’ll leave the other macros in this post, but if you want one that just does it all in one toggle command, skip the information below and scroll down to the end under ‘Angela’s solution’.

What to do? Well, one way to get a keyboard shortcut it to create a macro that does what you want to do, and then assign a keyboard shortcut to it. That’s what I ended up doing, except I had to create two macros—one for showing and one for hiding the track changes (I couldn’t figure out how to create a ‘toggle’ macro that used the same command to turn on and off, depending on the current state). And I assigned these keyboard shortcuts that had some logic for me: Ctrl+Shift+{ (i.e. open the bracket) to show the markup, and Ctrl+Shift+} (i.e. close the bracket) to hide the markup. But you can use whatever shortcut that works for you.

The two macros I wrote are below. Once you’ve added them to you VBA area, assign a keyboard shortcut to them from the Customize Ribbon options area.

This macro shows all markup:

Sub MarkupViewAll()
'
' Shows All Markup view for markup (i.e. shows track changes)
' Created by Rhonda Bracey, CyberText Consulting, 31 May 2019
'
'
    With ActiveWindow.View
        .ShowRevisionsAndComments = True
        
    End With
End Sub

This macro shows the final view:

Sub MarkupViewFinal()
'
' Shows Final view for markup (i.e. hides track changes)
' Created by Rhonda Bracey, CyberText Consulting, 31 May 2019
'
'
    With ActiveWindow.View
        .ShowRevisionsAndComments = False
        .RevisionsView = wdRevisionsViewFinal
    End With
End Sub

I’m sure somebody cleverer with macros than me could write something more elegant (such as using the one macro and keyboard shortcut to toggle the view depending on the current view—if you know how to do that, feel free to contribute in the comments.

Angela’s solution

NOTE: Some of this macro goes off the page—to get it all, copy this macro, don’t retype it.

Sub ToggleMarkupViewAllToFinal()
' 
' Toggles from Markup view all to Markup view final
'
    ActiveWindow.View.ShowRevisionsAndComments = Not ActiveWindow.View.ShowRevisionsAndComments
    
End Sub

Thanks Angela! (by the way, I assigned Alt+m as my keyboard shortcut for this—it works a treat!

h1

Word: Apply a template

May 21, 2019

Before Word 2007, it was easy to apply/attach/link to a template via Tools > Options > Templates and Add-Ins. Not quite so simple once Word 2007 was introduced (instructions for Word 2007: https://cybertext.wordpress.com/2008/10/03/word-2007-apply-a-template/).

The steps changed again after Word 2010, and the steps below work for all versions of Word for Windows from Word 2010 to Word 365.

First, check if you have the Developer tab on your ribbon. If you do, skip these steps and go to the next set. If you don’t, then follow these steps:

  1. Go to File > Options > Customize Ribbon.
  2. In the right panel, check the Developer checkbox.
  3. Click OK.

Once you’ve got the Developer tab set up:

  1. Click the Developer tab.
  2. Click the Document Template button in the Templates group. This opens the Templates and Add-ins window, which works the same as in earlier versions of Word.
  3. Click Attach.
  4. Find your template, select it, then click Open.
  5. Optional: If you want to apply the template’s style settings to styles of the same name in your document, then check Automatically update document styles.
  6. Click OK.

Note 1: If you checked Automatically update document styles in step 5, then I STRONGLY suggest you turn it off again after you’ve attached the template and updated the styles automatically.

Note 2: Applying a template only affects styles. Other aspects of the template (content, headers/footers, page margins etc.) are not carried across into your existing document.

[Link last checked May 2019]

h1

Word: Macro to insert a landscape page

May 14, 2019

A client wanted an easy way for her staff to insert a landscape page into a report without messing up the headers and footers. I recorded a macro that does just that, but it relies on headers and footers being laid out using the alignment tabs, not borderless tables. Alignment tabs are much better than inserting tabs yourself as they automatically adjust if you change the page layout.

Note: If you use borderless tables for your headers and footers, this macro will still work, but you’ll have to manually turn off the Link to Previous options for the landscape page’s headers and footers and also for the following portrait page. I might see if I can tweak the macro to do that—if so, I’ll write it up as a separate blog post.

Step 1: Set up alignment tabs for the headers and footers

  1. Open a new Word document (or the template if you want to set this up in your template).
  2. Double-click in the header area to open the header. The cursor will be at the left margin.
  3. Optional: Add any text you want positioned at the left.
  4. In the Header & Footer Tools tab > Position group, click Insert Alignment Tab.
  5. By default the next position is Center. Make sure it’s selected, then click OK.
  6. Optional: Add any text you want positioned in the centre.
  7. Click Insert Alignment Tab again.
  8. Select Right then click OK.
  9. Optional: Add any text you want positioned at the right.
  10. In the Header & Footer Tools tab > Navigation group, click Go to Footer.
  11. Repeat steps 3 to 9 above for the footers.
  12. Double-click in the main body of the document to close the header/footer area.

Step 2: Install and run the macro

The macro you will use to insert a landscape section is listed below these steps.

  1. Go to the View tab >Macros group, then select View Macros from the drop-down list.
  2. In the Macro Name field, type InsertLandscape (if you have other macros listed, the one listed first will be in that field—just type over it)
  3. Click Create. This opens the Visual Basic for Applications (VBA) window, with these lines already inserted:
    Sub InsertLandscape()
    ‘ InsertLandscape macro
    End Sub
  4. Copy the macro below this set of steps.
  5. Paste it into the blank area above End Sub.
  6. Save the change and close the VBA window. (If you’re working in a template and only want this macro available to documents based on that template, then select the template name from the Macros in field.)
  7. Test the macro by running it:
    • Go to the View tab >Macros group, then select View Macros from the drop-down list.
    • Select the InsertLandscape macro.
    • Click Run.
  8. A landscape section should be inserted into your document, and the headers and footers should all align correctly for the landscape section.

Macro

' Inserts a landscape section, adjusts headers and footers
' Created by Rhonda Bracey, CyberText Consulting, May 2019
'
Selection.TypeParagraph
Selection.InsertBreak Type:=wdSectionBreakNextPage
Selection.TypeParagraph
Selection.TypeParagraph
Selection.InsertBreak Type:=wdSectionBreakNextPage
Selection.MoveUp Unit:=wdLine, Count:=2
If Selection.PageSetup.Orientation = wdOrientPortrait Then
Selection.PageSetup.Orientation = wdOrientLandscape
Else
Selection.PageSetup.Orientation = wdOrientPortrait
End If
ActiveWindow.ActivePane.SmallScroll Down:=-3
ActiveWindow.ActivePane.LargeScroll Down:=1

What this macro does:

  • Inserts an empty paragraph.
  • Inserts a Next Page section break.
  • Inserts two more empty paragraphs.
  • Inserts another Next Page section break.
  • Moves the cursor back up to one of the empty paragraphs between the two section breaks.
  • Changes the area between the section breaks to Landscape orientation.
h1

Word: Macro-enabled templates stripped by Dropbox?

May 2, 2019

Well, well, well! I haven’t encountered this before, but it looks as though Dropbox.com stripped the macros from two Word templates I created for a client earlier this week.

I’d emailed her the templates (dotm files) on Tuesday, and sent some follow-up notes on Wednesday. Today (Thursday) she contacted me to ask if I’d sent the templates because she hadn’t received them. I thought that maybe her email provider’s security settings were stopping them getting through, so I zipped them up and emailed her the zip file. The zip file didn’t get to her either, so I created a folder for her in my Dropbox.com account and put the individual template files there and sent her the link to the folder.

She was able to download the templates, but when she tried to run them, she got error messages about the macros. She contacted her IT people and me. I’ve just got off the phone with her IT guy—he also had trouble with the templates and had macro error messages, and when I walked him through where the macros should be, they weren’t there. I emailed him a zip file, but he didn’t get that either. I also put the zip file into the Dropbox.com folder, and he was able to get that. Once he’d extracted the files locally, he was able to open a new document based on the template successfully AND run the macros without error. He also did some quick Googling and found that Dropbox.com DOES strip macros from Word templates. But not from those files stored in zip files—yet.

What are we to do? I use Word macros to save myself and authors enormous amounts of time. This is part of my job. My clients want quick and easy ways to apply corporate formatting to imported Excel tables and the like, to add landscape pages without angst, and so on. I create or modify macro-enabled templates for my clients and need to send the revised versions to them. If email settings and now Dropbox.com are either not allowing the templates through, or are stripping the macros out of them, how are those of us who live remotely from our clients meant to do our jobs?

h1

Word: Change author/date citations to links to auto-numbered references

May 1, 2019

Warning: Long post! Lots of steps, lots of concentration required. I suggest printing it out, grabbing a cup of your favourite beverage (preferably nonalcoholic), and working through it step by step with no distractions until you are familiar with the process.

Issue

For many years, my main client used author/date citations (e.g. Smith, 2006) in their documents, with an accompanying References list that was sorted alphabetically by author (followed by date if there was more than one instance of an author, and an alphabetic designator if there was more than one year the same by the same author).  Because ‘author’ includes any authoring body, there was a problem—they cite many of their own documents, which meant you had citations such as ‘Company, 2010’, ‘Company, 2010a’, ‘Company, 2010b’ etc. If you have to refer to more than 26 documents by the same author in the same year, you run out of letters!

To help alleviate this issue and streamline their references and citations, about three years ago they changed their templates to include an auto-numbered References list, which meant the author/date method had to change to use cross-referenced numbers. It’s a far more efficient method and is easy to update if items are added to or deleted from the References list.

For new documents, it’s easy—just use the new method. But what about the older documents on the old templates that still use the author/date citation method? If the decision is made to transfer an older document to the current template, then that decision invariably includes updating the author/date citations and references to the numbered method.

Below I discuss how I do this. It’s a complex method that can take many hours (some of the references lists I deal with contain 200 or more items). It would be greatly simplified if the client used something like a networked EndNote or Zotero database, but they don’t and won’t in the foreseeable future, so that’s not an option. In the meantime, I do it manually. This process works for me—it may not work for you, or you may use a better method. Feel free to comment.

Solution

This process assumes you’re working with an existing document that uses manually entered author/date citations, and have an existing references list that holds the bibliographic details for those citations.

Unless you are required to track these changes, turn off Track Changes before you start.

Step 1: Add a Back button to your Quick Access Toolbar (one-off task)

If you don’t already have a Back button on your Quick Access Toolbar (QAT), add it. You’ll thank me later!

  1. Click the drop-down arrow at the far right of the QAT, and select More Commands.
  2. In the Choose Commands From column, select All Commands from the drop-down list.
  3. Scroll down the list to Back and select it.
  4. Click Add in the middle of the two panels to add it to the QAT. Optional: Use the up and down arrows on the right to place it where you want it to go.
  5. Click OK.

The Back button is now on your QAT. It is inactive at the moment and only becomes available once you’ve clicked a cross-reference link (e.g. to a heading from the table of contents, or to a section, table, figure, appendix, or reference list number), and gone to another place in the document. You can then click it to return to where you clicked the link.

Step 2: Create a blank auto-numbered References list (one-off task)

You’ll already have a References section in your document—in this step, you can either create a new section, or add the new auto-numbered table to the existing one. You’ll still need to keep the existing list until you’ve transferred all the bibliographic details to the new list.

  1. Optional: Add a new heading (References) to your document, and assign the Heading 1 style to it. (If you want to keep your existing References section, just add a couple of empty paragraphs above or below the current list and then follow the steps below.)
  2. Insert a multi-row, two- or three-column table in this section, and style it as you want:
    • Use two columns if you only need a column for the number and another for the bibliographic details of the reference
    • Use three columns if you also need a column for document numbers or other information
    • Apply table header row styling to the top row, and add column headings (I use Ref. No., Title, and Doc ID).
  3. Select all the cells (but not the header row cell) in the first column and apply auto numbering to them:
    • Use either the number icon on the Home tab, or another style you use for numbering
    • Make sure the numbering starts at 1.
  4. Add more rows (I typically start with 25 rows, adding more as needed).

Step 3: Find and highlight all citations (one-off task)

In this step, you’ll use the power of wildcard find and replace to find all author/date citations, replace them with themselves (i.e. make no change), add a designation for the cross-reference (in this example, (Ref. ), which has a nonbreaking space between the period and the closing parenthesis), and highlight them. The pattern you’re looking for is a year (the authors [and how the citation is written] will be different, so you can’t pattern match those, but the years are likely to start with only ’19’ or ’20’). Whether the citation is styled ‘(Smith, 2006a)’ or ‘Smith (2006b) found…’, this method will still find it.

  1. Go to the beginning of the document.
  2. Select a highlight colour you’re not using for anything else. You MUST select a highlight colour—if you don’t, then no highlight colour will be applied to the found text.
  3. Press Ctrl+h to open the Find and Replace dialog.
  4. Click More.
  5. Check the Use wildcards checkbox.
  6. In the Find field, type: (<19*>)
  7. In the Replace field, type: \1 (Ref.^s) (Note: There’s a space after 1)
  8. With your cursor still in the Replace field, click Format and select Highlight. ‘Highlight’ should be shown immediately below the Replace field.
  9. Click Find Next.
  10. If you find a citation, click Replace to highlight the date and add the partial text container for the cross-reference number (i.e. (Ref. ) ). This method finds ALL words starting 19, including measurement values, dates, etc. whether they are part of a citation or not, so NEVER click Replace All. Check every one, and keep clicking Find Next for each date you find that isn’t part of a citation, only click Replace for those that are part of a citation. Ignore the dates in the References list—they aren’t citations either.
  11. Once you’ve finished the 19xx dates, it’s time to do the 20xx dates. Go back to the top of the document. In the Find field change 19 to 20, leaving everything else the same (you should now have (<20*>) in the Find field, and the Replace field should still be \1 (Ref.^s), with ‘Highlight’ listed below it).
  12. Click Find Next.
  13. If you find a citation, click Replace to highlight the date and add the partial text container for the cross-reference number. The same rules apply as listed in step 10 above.
  14. Once you’ve finished, close the Find and Replace dialog.

You’ve now identified all the citations in the document. The next major step is the most time-consuming, so make sure you allow plenty of time for it. For a long document with many different citations, this next step could take many hours.

Step 4: Assign a cross-referenced number to each citation (repeat multiple times, once for each citation)

  1. If field shading isn’t turned on, turn it on:
    • Go to File > Options
    • Click Advanced
    • Scroll down to the Show Document Content section
    • Select Always from the Field Shading drop-down list.
  2. Go to the beginning of the document.
  3. Use your eyes to scan the text for the highlight colour you used for the citations. If you didn’t use a different colour, it may not be a citation, so check.
  4. Leave the author/date as it is for now, and put your cursor just inside the closing parenthesis, after the nonbreaking space.
  5. On the References tab > Captions group, click Cross-reference.
  6. Choose:
    • Numbered item from the Reference Type drop-down list
    • Paragraph number (no context) from the Insert Reference To drop-down list
  7. Scroll down the list of items to the References section, then select 1. immediately below it. (This is the row numbered 1 in the References list table you created earlier.)
  8. Click Insert.
  9. A cross-reference field for 1. is added to your citation—you should now have (Ref. 1). Because you turned on field shading in step 1, the number should have grey shading behind it, indicating it’s a clickable field (you’ll see this only after you remove the highlighting).
  10. Copy the original author/date citation (e.g. Smith, 2006), then Ctrl+click the cross-reference number. This takes you to the matching row in the References table.
  11. Paste the copied author/date citation into that row. You’ll add all the bibliographic details later—you don’t want to lose the original citation at this stage, so you’ll store it in the row that will later be populated with the bibliographic details for that citation. (Tip: If you only have a small list, then you could find the matching details from the old list and add them now)
  12. Click the Back button you added earlier to the QAT to return to the citation cross-reference.
  13. Copy the number you just inserted (the field) to the clipboard.
  14. Because a single citation could have been used several times in the document, you now need to search for other instances of that citation and add the cross-reference you copied in the step above:
    • Open the Find and Replace dialog (Ctrl+h)
    • Clear the Use wildcards checkbox
    • Clear the text from the Find field
    • Clear the text from the Replace field
    • Click No Formatting to clear the ‘Highlight’ wording from below the Replace field
    • In the Find field, type the original author/date citation (sometimes the author or the date may be enough)
    • Click Find Next
  15. If you find the citation used again:
    • Click out of the Find and Replace dialog
    • Paste the field (the cross-reference number) you copied at step 13 into the (Ref. ) placeholder, just before the closing parenthesis
    • Clear any remaining highlighting and delete any unwanted text and/or extra parentheses for this citation, including the author/date part—you no longer need this because you already added it to the References list back in steps 10 and 11.
    • Click back into the Find and replace dialog, and continue searching for other instances of that citation
    • For each one found, paste the field (as above) and clear the highlighting, extra text etc.
  16. Once you’re satisfied that you’ve found them all, go back to the first instance of that cross-referenced citation, delete the original author/date, any extra parentheses, and clear the highlighting.
  17. Repeat steps 3 to 16 above for the second citation, choosing 2 instead of 1 at step 7.
  18. Repeat steps 3 to 16 for every other highlighted citation, changing the number each time. Yes, this can take HOURS. Add more rows to the bottom of References list if you’re starting to run out.

Step 5: Populate the References list with the bibliographic details from the old References list (one-off task)

Once you’ve added all the citations, you’ll need to find their matching counterparts in the original References list.

  1. Go to the first row of the table.
  2. Check the author/date citation you pasted there earlier.
  3. Find the matching item in the original References list. Use the original author/date citation information to confirm you have the correct one. (Hint: Copy the original References list into a new document and show it on a second monitor, if you have one.)
  4. Copy/paste the original bibliographic details into the Title cell in the matching row of the numbered table, deleting  the original author/date citation placeholder. (If you’re not comfortable deleting the original citation just yet, leave it for now and highlight it for later deletion.)
  5. Optional: Delete any date designator (e.g. 2010b becomes 2010), and shift any document number etc. to the other column.
  6. Repeat the steps above for each row of the table that has an author/date citation.
  7. Delete any unused rows when you’ve finished.

Adding, deleting items from the new list and updating the list

Adding new references and citations

If you need to add new items to the References list table, the simplest way is to:

  1. Insert a new row at the end of the table.
  2. Add the bibliographic details.
  3. Create the cross-referenced citation to that new number.

If you want to add the item so that the cross-referenced citation is numbered sequentially in the main body of the document, in line with the other citations, it’s a bit more complex:

  1. Turn off Track Changes.
  2. Insert a new row where you want to add the new reference (e.g. you might want it to become citation number 24, so you need to add a new row after row number 23. This new row becomes 24 and the previous 24 becomes 25 etc.). The numbers in the table update automatically, but the citations in the main document don’t.
  3. Add the bibliographic details.
  4. Create the cross-reference citation to that new number.
  5. Update all the fields in the document to reflect the new number order of the other cross-referenced citations (e.g. the previous number 24 now becomes number 25, 25 becomes 26 etc.). See below for how to do this.

Deleting reference items

If you need to delete reference items from the table:

  1. Turn off Track Changes if you aren’t required to track this change.
  2. Go to the cross-referenced citation if it exists (e.g. press Ctrl+f and search for Ref. 23 [you have to search via the navigation pane as you can’t search for a field number from the Find and Replace dialog]).
  3. Confirm that this is the one to be deleted—Ctrl+click the number to go to that row in the References table.
  4. If it’s correct, click the Back button on the QAT, and delete the cross-referenced citation.
  5. Search for any further instances of this and delete them too.
  6. Return to the References table and delete the row. The numbers in the table will automatically update, but the citations in the main document won’t.
  7. Update all the fields in the document to reflect the new number order of the other cross-referenced citations (e.g. the previous number 23 now becomes number 22, 24 becomes 23 etc.). See below for how to do this.

Updating the cross-referenced citations

Whenever you change an auto-numbered table, the numbers will automatically update, but the citations that refer to them don’t until you update all the fields in the document.

Unless you are required to track these changes, turn off Track Changes before you start.

To update all the fields in your document, do one of these:

  • switch to Print Preview view, then back to Print Layout view (quickest and easiest); or
  • press Ctrl+a to select the entire document, then press the F9 key; or
  • press Ctrl+a to select the entire document, then right-click on the selection and choose Update Field.

To update a single field, place your cursor to the immediate left of the grey shading, right-click, then select Update Field.

To check for broken fields, press Ctrl+f and search for Error!. If this message is in a cross-referenced citation, it means that Word can’t find the matching number in the References list. You’ll either have to add a new row for it (and reassign the correct number to the cross-reference), or delete the cross-referenced citation.

h1

Word: Add a separate list of appendices

May 1, 2019

Many years ago, I’d added a separate list of appendices in the front matter containing the table of contents (TOC), list of figures, list of tables etc. I’d forgotten how to do it, because these days almost every document I work on incorporates the appendix headings into the main TOC. However, I needed to do this for a new client, who had appendix placeholders in the document with no page numbering (the PDF’d appendices would be inserted later, so they only needed a heading page). Adding the appendix headings to the main TOC wasn’t an option because the main TOC has page numbers and you can’t tell some parts of the TOC to not have page numbers—you either have them for everything or for nothing, not for some and not others. So these appendix headings needed to go into a separate updateable and clickable list.

NOTE: You MUST be using a uniquely named style for your appendix headings, not Heading 1, etc. In the example below, the heading style for these level 1 appendix headings is ‘Appendix Heading’.

To add a new list of appendices to the front matter:

  1. Make sure you know the name of the style you use for the appendix headings.
  2. Go to the References tab > Captions group.
  3. Click Insert Table of Figures.
  4. On the Table of Figures dialog box, click Options.
  5. Select the style you use for the appendix headings from the styles list. In this example, the style is called Appendix Heading.
  6. Check the Style checkbox.
  7. Click OK to close the Table of Figures Options dialog box. (Ignore the web preview panel—it won’t show what you’ve chosen.)
  8. Optional: Clear the Show page numbers checkbox if you don’t want page numbers; leave it selected if you do.
  9. Click OK.
  10. If you already have a list of figures etc., you’ll be asked if you want to replace it. Click No.
  11. Your new list of appendices will be added to the front matter section.

To update your list:

  1. Click anywhere inside the list of appendices.
  2. Either:
    • Right-click and select Update Field, or
    • Go to the References tab > Captions group, then click Update Table.
  3. If asked, select the option to update the entire table.