A Word Macro To Simplify Resume Generation

Aug 8
Posted by david.woods

I have taken the summer off to look after our kids, get caught up on my todo list (yes it is 2 months long), and do some learning. Now that I am mostly caught up I decided to update my resume but find it hard to remember how many years of experience I have in technologies on my skills matrix. I don’t like sending out a resume that shows what year I started with a technology as that does not accurately represent the number of years of experience. I figured that I could compamise on this and have a master document that has what year I started with a technology and have a vba macro that converts it into years of experience. Here is what I did

  1. Created a new word document with a table in it with 3 columns (column #3 contains the year started) e.g.
    Category Skill Experience
    Languages C# 2003
      VB.NET 2003
      VBA 2010
         
    Database MSSQL 2000
      MYSQL 1999
      Oracle 1 year
  2.  Open up the macro editor (Alt+F11) and added a new module to the project
  3. Put in this code:
    Sub UpdateYears()
        Application.ScreenUpdating = False
        currentYear = Year(Date)
        For Each tbl In ActiveDocument.Tables
            For Each rw In tbl.Rows
                Dim experience As Integer
                If IsNumeric(StripJunk(rw.Cells(3))) Then
                    experience = currentYear - StripJunk(rw.Cells(3))
                    If (experience <= 1) Then
                        rw.Cells(3) = experience & " year"
                    Else
                        rw.Cells(3) = experience & " years"
                    End If
                End If
            Next
        Next
    End Sub
    Private Function StripJunk(ByVal s As String)
      StripJunk = Trim(Replace(s, vbCr & Chr(7), ""))
    End Function
  4. Saved my word document as “Word macro-enabled document *.docm”
  5. Ran the macro (in office 2010->click “view” on the ribbon. Then click the macro drop down. Then click “View Macros”. Run the UpdateYears macro
  6. Save a copy of the document as a regular word doc without the macros and send it off.

Hopefully this saves you a few hours of VBA/Macro headaches!

Filed Under: General

Leave a Reply

Your email address will not be published. Required fields are marked *

*