So I have a word doc with some text boxes that I make a copy of and add data to.
It has been working just fine for at least two years.
And it still works correctly on a second program.
But for some reason, all of a sudden the line of code
is causing an error. 438: object doesn't support this property or method
I have no clue why its not working all of a sudden.
It has been working just fine for at least two years.
And it still works correctly on a second program.
But for some reason, all of a sudden the line of code
Code:
.Visible = True
is causing an error. 438: object doesn't support this property or method
I have no clue why its not working all of a sudden.
Code:
Set appWord = New Word.Application
Set doc = appWord.Documents.Open("" & MSONewIssue & "", , True)
With doc
.FormFields("Text1").Result = "" & b & "" 'wo
.FormFields("Text2").Result = Me.Text4.Value ' SN
.FormFields("Text3").Result = "N/A" ' Higher SN
.FormFields("Text4").Result = "1" ' Quantity
.FormFields("Text5").Result = Date
.FormFields("Text6").Result = Me.Text0.Value
.Visible = True
.Activate
.SaveAs "" & Issue & ""
.Close
End With
Set doc = Nothing
appWord.ActiveDocument.Close
appWord.Quit
Set appWord = Nothing