How To: Screen Captures

After using Irfanview to do some serious screen capturing, I think it is probably the easiest/best tool around.
How To use Irfanview for screen captures:
1. Download the program: http://www.irfanview.com/ 
      a. Note that there are two downloads: Irfanview and the plugins.
2. Install and run it.
3. Choose Options -> Capture/Screenshot (or just hit the letter “c”)
4. Choose the type of screenshot – full screen, foreground window, rectangle, etc.
5. Choose how you want to save it – there’s two options:
     a. When you take the screenshot it opens an irfanview window for editing
     b. Or you can save directly to a file. Give the filename format, a directory name, and the image format.
6. There is also a checkbox to choose whether or not to include the cursor in the image
7. Click “Start”
8. Irfanview now runs in the background. Just type “Ctrl-F11” to get a snapshot.

MS Word 2007 Macros

As the documents that I am writing keep getting bigger, simple tasks, like reformatting every table in the document, are getting harder. So, I turned to Word macros for help. The list below contains some of the macros that I have found that make (my) life easier.

Word Tips


  1. How do I print multiple copies of a single page on 1 page?
  2. How do I copy footnotes to another document?
  3. How do I paste without formatting (quickly)?
  4. How do I reformat all the tables in a document?
  5. How do I update all the fields in a document?
  6. How do I make all the references (Figures, Tables, etc.) formatted in Italics?


  1. How do I print multiple copies of a single page on 1 page?

    In “Pages” fill in something like: 1,1,1,1,2,2,2,2

    For “Zoom”, choose 4 pages per sheet.

    This prints 2 pages, the 1st with 4 copies of page 1 and the 2nd with 4 copies of page 2.

    [Tip source Graham Mayor]

    back


  2. How do I copy footnotes to another document?

    Sub
    CopyFootnotes()

    Dim sDoc
    As Document

    Dim tDoc
    As Document

    Dim sId
    As String

    Set sDoc =
    ActiveDocument

    Set tDoc =
    Documents.Add

    For i = 1
    To sDoc.Footnotes.Count

        sId = sDoc.Footnotes(i).Index

        sDoc.Footnotes(i).Range.Select

        Selection.Copy

        tDoc.Activate

        With Selection

            .Style = “Footnote Text”

            .Font.Superscript = True

            .TypeText sId & ” “

            .Font.Superscript = False

            .Paste

            .TypeParagraph

        End With

        sDoc.Activate

    Next i

    tDoc.Activate

    End Sub

     

    [Tip source Graham Mayor]

    back


  3. How do I paste without formatting (quickly)?

    Use this macro:

    Sub pasteWithoutFormatting()
    '
    ' pasteWithoutFormatting Macro
    '
    '
    Selection.PasteSpecial DataType:=wdPasteText

    End Sub

    I assign this macro to “Cntl+Shift+v” so that I can use it quickly.

    [Source Microsoft]

    back


  4. How do I reformat all the tables in a document?

    Sub reformatAllTables()
    '
    ' reformatAllTables Macro
    ' Changes formatting on all tables in the document
    '
    Dim myTable As Table
    For Each myTable In ActiveDocument.Tables
    myTable.Select
    'myTable.PreferredWidthType = wdPreferredWidthPoints
    'myTable.PreferredWidth = CentimetersToPoints(16)
    myTable.AutoFitBehavior (wdAutoFitWindow)


    With Selection.ParagraphFormat
    .LeftIndent = CentimetersToPoints(0)
    .RightIndent = CentimetersToPoints(0)
    .SpaceBefore = 0
    .SpaceBeforeAuto = False
    .SpaceAfter = 0
    .SpaceAfterAuto = False
    .LineSpacingRule = wdLineSpaceSingle
    .WidowControl = True
    .KeepWithNext = True
    .KeepTogether = True
    .FirstLineIndent = CentimetersToPoints(0)
    .CharacterUnitLeftIndent = 0
    .CharacterUnitRightIndent = 0
    .CharacterUnitFirstLineIndent = 0
    End With

    ' Selection.Style = ActiveDocument.Styles("Normal")
    Next myTable
    ActiveDocument.Repaginate

    End Sub

    back


  5. How do I update all the fields in a document?
    Sub UpdateAllFields()
    '
    ' updateAllFields Macro
    '
    '

    Dim oStory As Range
    Dim oHeader As HeaderFooter
    Dim oFooter As HeaderFooter
    Dim oSection As Section

    For Each oStory In ActiveDocument.StoryRanges
    oStory.Fields.Update
    If oStory.StoryType wdMainTextStory Then
    While Not (oStory.NextStoryRange Is Nothing)
    Set oStory = oStory.NextStoryRange
    oStory.Fields.Update
    Wend
    End If
    Next oStory

    For Each oSection In ActiveDocument.Sections

    For Each oHeader In oSection.Headers
    If oHeader.Exists Then
    For Each oField In oHeader.Range.Fields
    oField.Update
    Next oField
    End If
    Next oHeader

    For Each oFooter In oSection.Footers
    If oFooter.Exists Then
    For Each oField In oFooter.Range.Fields
    oField.Update
    Next oField
    End If
    Next oFooter

    Next oSection

    Set oStory = Nothing

    End Sub

    back


  6. How do I make all the references (Figures, Tables, etc.) formatted in Italics?
    Sub formatReferenceFields()
    '
    ' formatReferenceFields Macro
    '
    ' Finds all references and changes the formatting to italics
    '
    Dim pRange As Word.Range
    Dim oFld As Word.Field
    Dim iLink As Long
    iLink = ActiveDocument.Sections(1).Headers(1).Range.StoryType
    For Each pRange In ActiveDocument.StoryRanges
    Do
    For Each oFld In pRange.Fields
    Select Case oFld.Type
    Case wdFieldRef
    oFld.Select
    With Selection
    .Font.Italic = True
    .Font.Bold = False
    End With
    Case Else
    'Do nothing
    End Select
    Next
    Set pRange = pRange.NextStoryRange
    Loop Until pRange Is Nothing
    Next

    End Sub

    [Tip source Greg Maxey. I modified it to change the formatting]

    back

<!– Add an entry:


  • back

  • –>

    Saving images from MS Word 2007

    What’s the easiest way to save images that are in an MS Word 2007 file?  Word 2007 changed the file format from .doc to .docx, which is really just a zip file (Like Java jar files).  Just change the file extension from .docx to .zip and then extract it with any Zip program (like Winzip).  Inside the extracted directory there is a sub-directory with all the graphics in the file along with XML files that describe the document.

    [Tip from Graham Mayor]

    MS Word Tip of the Day – Pasting unformatted text

    If you copy and paste text from one document (or the internet) into an MS Word document, you’ve probably come across the formatting problem. When you paste the text it retains the formatting from the source document. I found a nice article on the MS site on how to create a work around which pastes unformatted text (refer to article at Microsoft site).

    The idea is to create a macro that uses this line:

    • Selection.PasteSpecial DataType:=wdPasteText

    Assign this macro to a key. I chose Ctrl+Shift+v so that Ctrl+v does a regular paste, and add “shift” for unformatted pasting.

    Good Deed of the Day

    I went out for a walk last night and noticed that my neighbor’s big black dog got out of their yard again and was wandering around the neighborhood.  I figured that I would do my good deed of the day and take him back.  Luckily, when I called his name he actually listened and came right over.  I then took him back to their house, opened the gate, and he ran right in.  I locked the gate and gave myself a pat on the back for a job well done.
    There was only one problem…. it wasn’t their dog!

    Parking Lots

    Growing up, my family drove a 1976 Volvo station wagon which we affectionately called “Helga”. Helga had about 30,000,000 miles on her and you could feel things hit your feet as we drove because the floor was rusted out. Just about every part on the car had been replaced at some point, except for the odometer which broke after 17 years.  But who needs an odometer?  We didn’t need to know when 5000 miles had passed since the last service because Helga went to the garage once a week for some random problem.

    Now, being that Helga was a special car, she had to have a special parking spot.  If we went to a shopping mall, my father would park the car in the last spot in the lot.  This is the spot no one wants because it is so far from the store entrance.  You almost need to catch a taxi to get there. If we were in a small parking lot, then my father would never park our straight in a parking space.  He would always park diagonally and take up two spaces.  This way no one would put a ding in the side of the car.  Did I mention that the car was completely rusted out?  Did I mention that it had a billion miles on it?  At least we didn’t have any dings in the doors.

    So, I felt a little nostalgia when last week I came across this parking job:
    I am searching for an explanation but not finding any.  Maybe there was no other place to park? No.  Maybe he had a nice shiny new car? No. Maybe the lines were faded? No.
    Well, it looks like he doesn’t have any dings in his doors either.

    Out of Order

    Did you ever go to the mall and see those little rides for the kids that you put a few quarters into and it shakes them around for a minute?  Most of the time they have an “Out of Order” sign on them, and now I know why:
    Maybe they should have a “Maximum number of children” sign on them instead of a weight limit. (And notice how the only kid not in the ride is the smallest one who should probably be the only one in it!)

    This brings me to the question:  Did your parents let you ride on these rides when you where a kid?  I don’t think I ever rode on one.