Archive for February, 2020

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

For another way to do this, but instead changing the colour of a selected set of words, see https://wordribbon.tips.net/T013773_Changing_the_Color_of_a_List_of_Words.html

[Links last checked June 2020]

h1

Save a WebP file as another image file format

February 9, 2020

Back in 2010, Google introduced an image file type called WebP that has a smaller file size and is optimised for viewing online. However, not all image software opens WebP files, and older browsers may have trouble too. If you can’t open such a file, there’s a simple way to save the image (in Windows), then convert it to a file type (e.g. PNG, JPG) your image software can understand.

Here’s how:

  1. Right-click on the image in the browser, and select the option to Save image as (different browsers will use different wording—you’re looking for the option that lets you save the image).
  2. Save the file to a location on your computer.
  3. Go to that location, right-click on the file you just saved, then select Open with.
  4. Select Paint. (Yes, Paint—the program that’s been in Windows since forever!)
  5. In Paint, go to File > Save As.
  6. Select the image file type you want to use (e.g. PNG or JPEG).
  7. Give the file a name (or use the original), navigate to where you want to save it, then click Save.
  8. You’ll get a message that any transparency will be lost. Click OK.
  9. You can now open your newly saved file in image software that supports the file type you chose at Step 6.

More information on the WebP format and browser and software support for it: https://en.wikipedia.org/wiki/WebP

[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.