I would cut and paste it but it won't let me into the template so here goes,
if I have to fix the code, how would I get back into the template, if it
won't let me?:
This is for the Userform:
Private Sub Document_New()
Dim oForm As frmDismissal
On Error Goto Error_DocumentNew
Set oForm = New frmDismissal
oForm.Tag = "Cancel"
oForm.txtDate.Text = Format$(Date, "mm/dd/yyyy")
oForm.Show
If oForm.Tag = "OK" Then
ActiveDocument.Bookmarks("ClientName").Range.Text = oForm.txtClientName.Text
ActiveDocument.Bookmarks("PetName").Range.Text = oForm.txtPetName.Text
ActiveDocument.Bookmarks("Doctor").Range.Text = oForm.txtDoctor.Text
ActiveDocument.Bookmarks("Date").Range.Text = oForm.txtDate.Text
Unload oForm
Set oForm = Nothing
Else
Unload oForm
Set oForm = Nothing
ActiveDocument.Close wdDoNotSaveChanges
End If
Exit_DocumentNew:
Exit Sub
Error_DocumentNew:
On Error Resume Next
Unload oForm
Set oForm = Nothing
ActiveDocument.Close wdDoNotSaveChanges
Resume Exit_DocumentNew
End Sub
Here's the next one (for the cancel button):
Option Explicit
Private Sub cmdCancel_Click()
Me.Hide
End Sub
Here's the ok button:
Private Sub cmdOK_Click()
Me.Tag = "OK"
Me.Hide
End Sub
Thanks for all your help!!!
Jill