Hello everyone and happy holidays if you celebrate,

I am finally trying to retool one of my old userforms, because the old one had become painfully slow (because I was an idiot). It appears that I have one last thing to fix that has been bothering me. I am trying to save my output from a contact logger form to an archive file that is a word document. It opens the file, pastes the output from the contact logger to the word file, saves the word file, and then closes it. Most of the time, it works very well. The only stumbling block for me is if I goof up, and have the file open. The code below was mostly copied from the web of course. I was thinking that moving the "open the file" part up into the error handler would be something to try, but was at a loss for how to set the file to active if it was already open.

Private Sub WordOutput(Output As String)

   Dim objWord

   Dim objDoc

   Dim objSelection

  Dim END_OF_STORY

    Dim MOVE_SELECTION

   END_OF_STORY = 6

    MOVE_SELECTION = 0
    
     'We need to continue through errors since if Word isn't
    'open the GetObject line will give an error
    On Error Resume Next
    Set objWord = GetObject(, "Word.Application")

    'We've tried to get Word but if it's nothing then it isn't open
    If objWord Is Nothing Then
        Set objWord = CreateObject("Word.Application")
    End If

    'It's good practice to reset error warnings
    On Error GoTo 0

  Set objWord = CreateObject("Word.Application")

  Set objDoc = objWord.Documents.Open("C:\OneStopArchive.docx")

  objWord.Visible = True

  Set objSelection = objWord.Selection

  objSelection.Font.Bold = False

  objSelection.EndKey END_OF_STORY, MOVE_SELECTION

  objSelection.Font.Size = "14"

  objSelection.TypeText (Now & vbCrLf & Output & vbCrLf & vbCrLf)

 objDoc.SaveAs ("C:\OneStopArchive.docx")
 
 objWord.Quit
 Set objWord = Nothing

End Sub
Any help would be appreciated.

BobR