I have a word document which I am using as a template for other projects. The file is saved as an .docx and includes a Macro to save the document with a file name dependent on content control box titled "STATE". I would prefer the macro save the document without the macro included. When I run the macro, the document saves to the correct file location however when opened I get an error that reads:
We're Sorry. We can't open FILE LOCATION because we found a problem with its contents. No error details available.
I assume there is an error somewhere in my code. I am using Word 2013. Any help would be appreciated!
Sub Silent_save_to_DOC()
Dim strText As String, strDate As String, strDrop As String
strText = ActiveDocument.SelectContentControlsByTitle("STATE")(1).Range.Text
Dim strFilename As String
strFilename = "C:\Users\Tom\Desktop\Quote - " & strText & ".docx"
ThisDocument.SaveAs strFilename
End Sub