Word 2016 validating bookmark values vba
I just want a simple reset code or reload code or something. Value = "1st September 2008" End Sub Private Sub Command Button1_Click() Application. I thought about getting vb to close the file and reopen it but because it will be on shared computer and lots of people will be using it, it will cause problems. If a template is not a good idea for you could you post your document so we don't have to recreate it please. This is the whole code: Private Sub User Form_Initialize() With title .
I'm sure there must be a way around it, even if it is long winded. Close Save Changes:=False End Sub Private Sub Command Button2_Click() fullname.
I've done loads of php/mysql coding just never vb so im a bit of newbie. Value = "1st September 2008" End Sub Private Sub Command Button3_Click() Unload Me Active Document.
Can someone tell me how to delete the text created at the bookmarks.
Or to reset the letter to clear everything entered.
You clone a new document (File New) and choose the template. The template is not changed, so another new document will be, again, a fresh new copy. I read the thread and thought I would re-iterate your original comment.
The userform comes up automatically, and you go from there. Add bname, r End Sub Private Sub User Form_Initialize() With title . NOTE: If using this, I would definitely place the replacing Sub - wb..odd name that BTW - in a standard module, NOT the userform module. Show End Sub Private Sub title_Change() wb "title", title End Sub Private Sub title2_Change() wb "title2", title End Sub Private Sub Address_Change() wb "Address", Address End Sub Private Sub NINO_Change() wb "NINO", NINO End Sub Private Sub NINO2_Change() wb "NINO2", NINO2 End Sub Private Sub chbenddate_Change() wb "End Date", chbenddate End Sub Private Sub Processor_Change() wb "Processor", Processor End Sub Private Sub fullname_Change() wb "fullname", fullname End Sub Private Sub fullname2_Change() wb "fullname2", fullname End Sub Private Sub fullname3_Change() wb "fullname3", fullname End Sub I'm sure im missing something really simple. Actually, if the original request is dealt with: "I then want the text entered at the bookmarks to be deleted " That is, ALL text at ALL Bookmarks deleted (or rather changed to "" as the code does), then using your Sub Sub Clear Everything() Dim o BM As Bookmark For Each o BM In Active Document. Name, "") Next End Sub will call the replacing Sub for each bookmark, passing the bookmark name, and the empty string. I read the thread and thought I would re-iterate your original comment. Option Explicit Sub Clear Bookmarks() Dim i As Long Dim str Name As String For i = 1 To Active Document. Name Fill BM str Name, "" Next i lbl_Exit: Exit Sub End Sub Private Sub Fill BM(str BMName As String, str Value As String) 'Graham Mayor Dim o Rng As Range With Active Document On Error Go To lbl_Exit Set o Rng = . Thanks, Nick Edit: VBA tags added to code Nick, Have you considered saving the file as a template.Tags: Adult Dating, affair dating, sex dating