title: Opening Word Document using VBA in Access 2013
body: <p>I'm using Access 2013 and created a help button on a form that I would like to open up a Word doc with instructions. Here's the code I tried:</p>
  
  <pre><code>Private Sub cmdHelp_Click()
      Dim wrdApp As Word.Application
      Dim wrdDoc As Word.Document
      Dim filepath As String
  
      Set wrdApp = CreateObject("Word.Application")
      wrdApp.Visible = True
  
      filepath = "C:\...\Handout.docx"
      Set wrdDoc = wrdApp.Documents.Open(filepath)
  End Sub
  </code></pre>
  
  <p>The problem is, when I try to compile I get an error on the first line that says "User-defined type not defined"</p>