You have split two of the statements into two lines each, where they must be
one line in order to work.
Change to this:
Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks ("Text1").InsertBefore TextBox1
.Bookmarks ("Text2").InsertBefore TextBox2
End With
End Sub

Signature
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
>I have created a template based on the suggestion at
> http://www.word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
[quoted text clipped - 20 lines]
> Word 2000
> Windows 2003 over Citrix XPe
Greg Maxey - 15 Nov 2006 16:51 GMT
Jay,
Adding .Range will help too ;-)
> You have split two of the statements into two lines each, where they must be
> one line in order to work.
[quoted text clipped - 37 lines]
> > Word 2000
> > Windows 2003 over Citrix XPe
Jay Freedman - 15 Nov 2006 17:48 GMT
Yes, you're right. I'm working today on a machine without Office, so maybe I
should just keep my head down...

Signature
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
> Jay,
>
[quoted text clipped - 45 lines]
>> > Word 2000
>> > Windows 2003 over Citrix XPe
Greg Maxey - 15 Nov 2006 17:59 GMT
Jay,
Now I am really baffled. Martyn stated that "Thanks but as Jay pointed
out, the Range part of the statement is not needed in this instance
(and I don't need it for my purposes either);..."
That would lead me to believe that there must be more to Martyn's code
than he has posted or his concept of not needed is different than mine.
Based on the code that he has shown, I don't see how it could possible
work.
> Yes, you're right. I'm working today on a machine without Office, so maybe I
> should just keep my head down...
[quoted text clipped - 53 lines]
> >> > Word 2000
> >> > Windows 2003 over Citrix XPe
Jay Freedman - 15 Nov 2006 21:13 GMT
Agreed. If Martyn has tried to run his code, he'll find that it stops with a
compile error.

Signature
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
> Jay,
>
[quoted text clipped - 65 lines]
>>>>> Word 2000
>>>>> Windows 2003 over Citrix XPe
WembleyBear - 15 Nov 2006 17:00 GMT
Doh! Thanks Jay, that part works perfectly now. However the Autonew macro
doesn't start automatically when I open the template - it only starts if I
actually run the macro in the template. Again, I have put in the code as
shown in the example....
Sub autonew()
'
' autonew Macro
' Macro created 15/11/2006 by mgr060
'
UserForm1.Show
End Sub
> You have split two of the statements into two lines each, where they must be
> one line in order to work.
[quoted text clipped - 32 lines]
> > Word 2000
> > Windows 2003 over Citrix XPe
Martyn,
I hate to say that the obvious problem is that you didn't do a very
good job of following the instructions.
Your:
> Private Sub CommandButton1_Click()
> With ActiveDocument
[quoted text clipped - 3 lines]
> .InsertBefore TextBox2
> End With
Is missing the essential ".Range" method and the line continuation
characters "_" that are shown in the example.
See:
http://word.mvps.org/FAQs/MacrosVBA/_AtEndOfLine.htm
and "Writing Visual Basic Statements" In VBA Help.
> I have created a template based on the suggestion at
> http://www.word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
[quoted text clipped - 18 lines]
> Word 2000
> Windows 2003 over Citrix XPe
WembleyBear - 15 Nov 2006 17:05 GMT
Greg
Thanks but as Jay pointed out, the Range part of the statement is not needed
in this instance (and I don't need it for my purposes either); and the
example on the site is set out particularly poorly. Fortunately, I'm not a
total idiot....
Martyn :-)
> Martyn,
>
[quoted text clipped - 41 lines]
> > Word 2000
> > Windows 2003 over Citrix XPe
Greg Maxey - 15 Nov 2006 17:34 GMT
Martyn,
I note your smile, but still want to say that I didn't mean to imply
you where an idiot at all and apologize for coming across that way to
you or anyone else reading this thread. I'm sorry.
Hmm...I get an compile error "Method or data member not found" if I
exclude the .Range part. I sense I am about to be schooled ;-)
> Greg
>
[quoted text clipped - 50 lines]
> > > Word 2000
> > > Windows 2003 over Citrix XPe