V
VicCahoon
I have some standard letters in Word that use forms to collate the data and
then inserts the data into predefined bookmarks through-out the document (I
have listed some examples below)
Whilst this works fine, the code is not very foolproof as it relies on the
user NOT clicking the save button. If they do the current text is saved and
the next time they use the Standard Letter they still have the old details
on the document and then if they enter new data it is appended before the
old data.
Is there an alternative or someway of ensuring that the old text is cleared
off before new data is inserted?
I have considered disabling the 'Save' button and only allowing 'Save As'
but was hoping for a way of simply clearing the old data out and then insert
new text.
Any suggestions would be extremely welcome.
Thank you
ActiveDocument.Bookmarks("InsuredName").Range.InsertBefore fldName
ActiveDocument.Bookmarks("InsuredAddress").Range.InsertBefore fldAddress
ActiveDocument.Bookmarks("Salutation").Range.InsertBefore fldSalutation
then inserts the data into predefined bookmarks through-out the document (I
have listed some examples below)
Whilst this works fine, the code is not very foolproof as it relies on the
user NOT clicking the save button. If they do the current text is saved and
the next time they use the Standard Letter they still have the old details
on the document and then if they enter new data it is appended before the
old data.
Is there an alternative or someway of ensuring that the old text is cleared
off before new data is inserted?
I have considered disabling the 'Save' button and only allowing 'Save As'
but was hoping for a way of simply clearing the old data out and then insert
new text.
Any suggestions would be extremely welcome.
Thank you
ActiveDocument.Bookmarks("InsuredName").Range.InsertBefore fldName
ActiveDocument.Bookmarks("InsuredAddress").Range.InsertBefore fldAddress
ActiveDocument.Bookmarks("Salutation").Range.InsertBefore fldSalutation