Hi
I have this macro for a command button in my template to save a form (word document when i open the template) after completion of the form. But i encountered run time error 4198 when i tried to run this in the word document generated from the template. Any help is appreciated. Thanks.
Code:
Private Sub SaveAsPDF_Click()
With Application.FileDialog(msoFileDialogSaveAs)
.FilterIndex = 3
.Show
If .SelectedItems.Count <> 0 Then
ThisDocument.SaveAs2 .SelectedItems(1), wdFormatDocument
End If
End With
End Sub
Thanks