Yes, I have done that already, but I was hoping to create a button on the
template document that will clear the fields for me. That way I don't have to
keep reopening a new template every time. Sorry I am rather lazy. I tried to
run some code that would empty the undo cache but every time I click on the
command button it doesn't work? However when I manually walk through the code
by pressing F8 it works? What is with the command button??? Here is an
example, assign it to a command button:
Private Sub cmdNew_Click()
Do
ActiveDocument.Undo (1)
Loop While ActiveDocument.Undo = True
End Sub
> >Is there anyway to delete all the text after a bookmark in a document? Kinda
> >like if you started at the bookmark and then pushed Shift+End on your
[quoted text clipped - 15 lines]
> Microsoft Word MVP FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Doug Robbins - Word MVP - 22 Mar 2008 23:20 GMT
If you are using formfields, then have the code set the .Result property of
the formfield to ""

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Yes, I have done that already, but I was hoping to create a button on the
> template document that will clear the fields for me. That way I don't have
[quoted text clipped - 39 lines]
>> Email cannot be acknowledged; please post all follow-ups to the newsgroup
>> so all may benefit.
Tony Strazzeri - 24 Mar 2008 05:26 GMT
> That way I don't have to
> keep reopening a new template every time.
Hi Gabe,
What do you mean by this?
Why are you opening the template file at all?
The idea of a template file is that word creates a NEW DOCUMENT
document from the template. ie . if you double-click on the temlpate
file from Windows explorer word will create a new document from that
fil.
If the template is in the right place on your PC (ie in either of the
locations --"User Templates" or "Workgroup Templates" pointed to in
"Tools|Options|File Locations" then it will appear when you select
File|New. That will also make a new document from the temlpate.
What is hard about that? If you use the template all the time you can
create a simple macro to do the File|New and put that on a toolbar.
Hope this helps.
Cheers!
TonyS.
Jean-Guy Marcil - 24 Mar 2008 17:35 GMT
> Yes, I have done that already, but I was hoping to create a button on the
> template document that will clear the fields for me. That way I don't have to
[quoted text clipped - 9 lines]
> Loop While ActiveDocument.Undo = True
> End Sub
Kind of a strange way of doing things... But if you insist, the above code
should be repalced by:
ActiveDocument.UndoClear