title: VBA Excel - save as word document not working
body: <p>Somebody please help me before my laptop goes sailing out the window. I have created an Excel userform that, after everything is entered, copies text from one cell on the worksheet and pastes it into a new Word document. It works beautifully, and the Word document opens like it's supposed to and pastes the contents of the cell into it. I could manually save the open Word document at that point, but I want the document to save with a specific filename and into a specific folder, then close Word completely. The SaveAs didn't work for me; I don't know what I'm doing wrong. </p>
  
  <p>This is my first post btw - was hoping that I would find my answer by searching, but after hours of searching and trying different things, I gave in and posted. I apologize in advance if I break any question-asking etiquette rules! </p>
  
  <p>The following code is for a button click on my userform, snipped right after I copy the cell I want to paste into Word. 
  Edit: I changed my original question to reflect that I tried the SaveAs2 fix suggested. I'm now getting the error "Invalid or unqualified reference". Help?</p>
  
  <pre><code>'copy to word
  Dim objWord As New Word.Application
  Dim objDoc As New Word.Document
  
  'Copy the range I want to paste in new Word document
  Range("M47").Copy
  
  'Paste into the new Word document
  With objWord
      .Documents.Add
      .Selection.Paste
      .Visible = True
  End With
  
  '****************WORKS FINE UP UNTIL THIS POINT.
  
  'The document opens with the text I want in it.
  
  'Creating the special filename
  Dim strFilename     As String
  Dim rngRange        As Range
  
  'Cell in Excel Worksheet from where filename is to be picked (patient date    of birth)
  Set rngRange = Worksheets("Scores").Range("D95")
  
  'Create File name with DOB, 'PAI', &amp; today's date
  strFilename = rngRange.Value &amp; "PAI" &amp; Format(Now(), "mmddyyyy")
  
   .SaveAs2 Filename:=("C:\Users\Mary Anne\Google Drive\") &amp; strFilename, _
  FileFormat:=16
  
  End Sub
  </code></pre>