I am using MS Word and VB 6.3. I need to save my document at the close of the document. I would like to code the path and filename of the document. My current code is below, this code works so far, however, Words save dialogue box opens after I exit the save dialogue box I created. Can I stop Words save dialogue box from opening? Also what is the correct format if I want to add the current date and time to my file name.
Option Explicit
Private Sub CommandButton1_Click()
ActiveDocument.SaveAs filename:="C:\temp\TEST3"
Unload SaveYourFile
ActiveDocument.Close
End Sub
Private Sub CommandButton2_Click()
Unload SaveYourFile
ActiveDocument.Close
End Sub
Private Sub TextBox1_Enter()
TextBox1.Text = "C:\temp\TEST3"
End Sub
Private Sub UserForm_Click()
End Sub
Option Explicit
Private Sub CommandButton1_Click()
ActiveDocument.SaveAs filename:="C:\temp\TEST3"
Unload SaveYourFile
ActiveDocument.Close
End Sub
Private Sub CommandButton2_Click()
Unload SaveYourFile
ActiveDocument.Close
End Sub
Private Sub TextBox1_Enter()
TextBox1.Text = "C:\temp\TEST3"
End Sub
Private Sub UserForm_Click()
End Sub