Archive for the ‘Word’ Category

h1

Word: Select a vertical section

March 31, 2020

Here’s a summary of the problem posted on an editors’ Facebook group I belong to: “I’ve been sent a Word doc that has been [converted] from a PDF. As it’s a doc in the editing stages for an academic journal, it still has the line numbers in the left margin. However, when it was [converted] to Word, these numbers are now part of each line individually (and some of them are images rather than text), meaning I can’t highlight them in one swoop and delete them. The idea of having to individually delete 50 numbers [from each of] 38 pages seems *very* untenable.”

Somewhere in the deep recesses of my mind, I recall once knowing how to do this—how to select a vertical section in Word and then styling it separately or deleting it. I hunted these blog posts (which are my memory dump), but couldn’t find anything. So I did some testing and found the solution, which is:

  1. Hold down the Alt key.
  2. Use the mouse to click and drag over the section of text you want to delete or restyle.
  3. Once selected, either press Del to delete it, or do something else to restyle it (e.g. make it bold, italics).

And that’s it. Here are a couple of screen shots to show you what this sort of selection looks like—note that you can select ANY part of the text.

Example showing just the first letter of each line selected

Example showing just the first letter of each line selected

Example showing the middle vertical section of a set of paragraphs selected

Example showing the middle vertical section of a set of paragraphs selected

h1

Word: Ctrl + arrow keys not working as expected

March 24, 2020

Here’s a strange one in Word—all of a sudden I couldn’t use a Ctrl+arrow key to jump from word to word.

I thought about closing Word then trying again, which likely would’ve worked. Then I heard a very faint sound coming from my headphones on the desk next me. Word was reading aloud to me and so was jumping from word to word without me realising it! I must’ve hit some keyboard combination to start it (yes, Alt+Ctrl+Space—I’d been using Ctrl+Space and must’ve accidentally hit Alt as well).

Once I found out where to turn the Read Aloud function off (Review tab), I had full control of my keyboard again.

Hope this helps someone else.

h1

Word: Add a web link to a document — quickly

February 26, 2020

In the category of “I didn’t know I could do this (or if I did, I’ve forgotten!)” comes this tip that I spotted in a forum post (https://superuser.com/questions/1024583/copy-link-location-keyboard-shortcut-in-windows-10).

Did you know that you can drag a link displayed in a browser into your Word document? Or into other text editing software? (my quick tests indicate that it DOESN’T work with Notepad)

There are several ways:

  • Click and drag the linked text into an open document. If the link is abbreviated or hidden by explanatory text (e.g. a link for ‘how to xxxx’), it will resolve to the full URL.
  • Select the URL in the browser’s address bar then drag it into the open document.
  • Select anything in a text field of a form on a web page, then drag it into the open document.

[Link last checked February 2020]

h1

Word: Converting a link to a full URL

February 26, 2020

I saw this technique on a Facebook page for editors—thank you, Karin H for sharing it with the group!

Scenario: You have clickable links in your Word document that are written like ‘this website’ (or the more meaningless ‘click here’). When you hover over the link, you can see the URL, which has been hidden behind readable text by the author. You want to extract the URL perhaps for use in another document, or even in the current document (especially if the document will be printed on paper where such links will never work). And you want to do it quickly.

Solution:

  1. Right-click on the link in the Word document.
  2. Select Copy Hyperlink.
  3. You can now paste it wherever you like. If you want to paste it into a Word document as plain text, then press Alt+h+v+t (longer method: Home > Paste > Paste Special > Unformatted Text)
h1

Word: Macro to find and highlight a set of specified words

February 22, 2020

This is a simpler version of a previous blog post—it doesn’t require you to set up and store a separate file of the words you want to highlight.

I wanted to create a list of vague words (such as some, most, often, frequently, sometimes—words that aren’t explicit or specific enough in technical writing and editing) that a simple Microsoft Word macro could find and highlight for me. I found some macros online that each partly solved the problem, and adapted one from Macropod (Paul Edstein) to suit my purposes as it was the closest to what I wanted. Full thanks to Macropod for this one.

There are several ways you can adapt this macro—I’ve commented some of my ideas in the code. I think the words are case sensitive, so if you want one with a capital (e.g. Some), you should add it as another entry.

NOTE: Copy all the code below to the clipboard—it goes off the page, so don’t type it out as you’ll miss some of it or could make a typo—then paste it into your VBA window.

Sub VagueWords()

' Source: Paul Edstein (Macropod), 8 Aug 2015: https://answers.microsoft.com/en-us/msoffice/forum/all/how-to-search-and-replace-multiple-wordsletters-in/af4753a0-7afd-433b-910d-a148da66f2bf
' Original macro name: MultiReplace
' Adapted by Rhonda Bracey, Cybertext Consulting, 22 Feb 2020
' You could duplicate this macro with a different name (e.g. LegalWords [for must, shall, etc.]) using a different list of words in the StrFind and StrRepl lists

Dim StrFind As String
Dim StrRepl As String
Dim i As Long

' In StrFind and StrRepl, add words between the quote marks, separate with a comma, NO spaces
' To only highlight the found words (i.e. not replace with other words), either use StrRepl = StrFind OR use the SAME words in the same order in the StrRepl list as for the StrFind list; comment/uncomment to reflect the one you're using
' To replace a word with another and highlight it, put the new word in the StrRepl list in the SAME position as the word in the StrFind list you want to replace; comment/uncomment to reflect the one you're using

StrFind = "very,just,rarely,often,frequently,majority,most,minority,some,perhaps,maybe,regularly,sometimes,occasionally,best,worst,worse,better,seldom,few,many"
StrRepl = StrFind
' StrRepl = "very,just,rarely,often,frequently,majority,most,minority,some,perhaps,maybe,regularly,sometimes,occasionally,best,worst,worse,better,seldom,few,many"
Set RngTxt = Selection.Range

' Set highlight color - options are listed here: https://docs.microsoft.com/en-us/office/vba/api/word.wdcolorindex
' main ones are wdYellow, wdTurquoise, wdBrightGreen, wdPink
Options.DefaultHighlightColorIndex = wdTurquoise

Selection.HomeKey wdStory

' Clear existing formatting and settings in Find and Replace fields
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting

With ActiveDocument.Content.Find
  .Format = True
  .MatchWholeWord = True
  .MatchAllWordForms = False
  .MatchWildcards = False
  .Wrap = wdFindContinue
  .Forward = True
  For i = 0 To UBound(Split(StrFind, ","))
    .Text = Split(StrFind, ",")(i)
    .Replacement.Highlight = True
    .Replacement.Text = Split(StrRepl, ",")(i)
    .Execute Replace:=wdReplaceAll
  Next i
End With
End Sub

[Links last checked February 2020]

h1

Word: Add a euro symbol

February 5, 2020

There are several ways you can add a euro symbol in Microsoft Word for Windows:

  • Type (E) — as soon as you type the closing parenthesis, it converts to the euro symbol. If you really want to type (E) and NOT have it change to a euro, then immediately press Ctrl+z to undo that last action (conversion).
  • Press Ctrl+Alt+e.
  • Go to Insert > Symbol, select More Symbols, then from the Font list for (normal text), select the symbol (see the screenshot below), then click Insert.
  • Hold down the Alt key as you type 0128 on the keyboard’s number pad (this will NOT work for the numbers above the keys—you must use the number pad). Where did I get this number from? If you look at the bottom right of the screenshot below, you’ll see that the ASCII character code for a euro symbol is 128. I know that I need to add a zero in front of the number (I’ve forgotten how I know this!), so that’s where the 0128 comes from.

Screenshot of Symbol window, showing normal text selected as the font, and the Euro symbol selected from the table of symbols.

Thanks to JC for inspiring me to write this post and to investigate and test the various quick and easy ways to write this symbol.

h1

Word: Find whole numbers inside square brackets or parentheses

January 29, 2020

In the comments on my post on using wildcards to replace and reformat text inside square brackets, Simon J asked what he’d need to use to find all numbers inside brackets.

I can think of a scenario where I’d want to do what Simon is asking—some of my authors, usually from an engineering background, will write out a number in full then put the numeral in brackets after the word (e.g. seventeen (17) joists, five (5) days). I usually delete one of these when I’m editing, as there’s typically no reason to have both.

Find what field:

  • To find numbers inside square brackets, make sure Use wildcards is on, then type this in the Find what field: \[[0-9]{1,10}\] 
  • To find numbers inside parentheses (round brackets), make sure Use wildcards is on, then type this in the Find what field: \([0-9]{1,10}\) 

Replace with field:

  • To replace what you found with nothing (i.e. delete all such occurrences), then leave the Replace field empty. Note: You may end up with double spaces (the spaces either side of the deleted bracketed number string), so do a standard find and replace to replace them with a single space.
  • To replace what you found with something else, then add that to the Replace field.

Notes and warnings:

  • This method only finds WHOLE numbers. Numbers with anything else in them (letters or any sort of punctuation, such as decimal points, any sort of hyphen or dash, commas as thousand separators, percent symbols etc.) will NOT be found.
  • You can change the parameters of the search string—the example above looks for one to ten consecutive numerals inside the brackets (this is the {1,10} bit). If you wanted different parameters, then you can change these values. For example, {2,5} would look for any whole numbers with 2, 3, 4, or 5 numerals (it would ignore single numbers and numbers with 6 or more numerals), and {1,} would look for numbers of any length from single-digit numbers through to an unlimited string of numbers.
  • This method does not allow you to replace just parts of the found string with other characters. For that you would need to surround each element in parentheses. For the first example, you’d use (\[)([0-9]{1,10})(\]), and for the second you’d normally use ([\(])([0-9]{1,10})([\)]), (Hint: Copy this string—there are lot of punctuation marks in here that you could get wrong if you try to type is out).

[Links last checked January 2020]