T
Tripla
I have created a user form for a letter template and would like the
senders information to stay the same if saved (kind of like
personalizing the template), unless cleared. My problem is coding the
form to keep the senders information intact upon opening. I have this
as my code wondering if I should go about this differently:
Public Sub cmdClose_Click()
Application.ScreenUpdating = False
With ActiveDocument
.Bookmarks("To").Range.Text = txtTo.Value
.Bookmarks("Attn").Range.Text = txtAttn.Value
.Bookmarks("Faxto").Range.Text = txtFaxto.Value
.Bookmarks("Phoneto").Range.Text = txtPhoneto.Value
.Bookmarks("From").Range.Text = txtFrom.Value
.Bookmarks("Faxfrom").Range.Text = txtFaxfrom.Value
.Bookmarks("Phonefrom").Range.Text = txtPhonefrom.Value
.Bookmarks("Date").Range.Text = txtDate.Value
.Bookmarks("Notes").Range.Text = txtNotes.Value
.Bookmarks("Pages").Range.Text = txtPages.Value
End With
Application.ScreenUpdating = True
Unload Me
End Sub
Any help is appreciated
Thanks
Tripla
senders information to stay the same if saved (kind of like
personalizing the template), unless cleared. My problem is coding the
form to keep the senders information intact upon opening. I have this
as my code wondering if I should go about this differently:
Public Sub cmdClose_Click()
Application.ScreenUpdating = False
With ActiveDocument
.Bookmarks("To").Range.Text = txtTo.Value
.Bookmarks("Attn").Range.Text = txtAttn.Value
.Bookmarks("Faxto").Range.Text = txtFaxto.Value
.Bookmarks("Phoneto").Range.Text = txtPhoneto.Value
.Bookmarks("From").Range.Text = txtFrom.Value
.Bookmarks("Faxfrom").Range.Text = txtFaxfrom.Value
.Bookmarks("Phonefrom").Range.Text = txtPhonefrom.Value
.Bookmarks("Date").Range.Text = txtDate.Value
.Bookmarks("Notes").Range.Text = txtNotes.Value
.Bookmarks("Pages").Range.Text = txtPages.Value
End With
Application.ScreenUpdating = True
Unload Me
End Sub
Any help is appreciated
Thanks
Tripla