Hi Vincent
This is the bit you need to change
With Doc.ActiveWindow.Selection
.TypeText "This text line."
.TypeParagraph
End With
Do this instead
Dim oRange as Object
Set oRange = Doc.Range
With oRange
.InsertAfter "This text line."
.InsertParagraphAfter
End With
If you are using early binding, then you could Dim oRange as Word.Range
instead, which might speed things up a bit

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
> Hello,
>
[quoted text clipped - 27 lines]
> Thanks in advance!
> Vincent
Vincent Verheul - 28 Apr 2006 16:25 GMT
Hi Jonathan,
Thanks for your quick response! Yes I do use early binding. I have to look
into this, quite some restructuring to be done... It looks like I have to
pass the oRange variable along to all subs and functions that I use to make
sure they all access the very same object. So far I have not mastered this
restructuring (of the VBA in my MsAccess project), but I suppose it will
take some focused effort to get it done...
Thanks again,
Vincent
> Hi Vincent
>
[quoted text clipped - 48 lines]
>> Thanks in advance!
>> Vincent
Jonathan West - 28 Apr 2006 17:33 GMT
> Hi Jonathan,
>
> Thanks for your quick response! Yes I do use early binding. I have to look
> into this, quite some restructuring to be done... It looks like I have to
> pass the oRange variable along to all subs and functions that I use to
> make sure they all access the very same object.
Alternatively make it a Public or module-level variable
> So far I have not mastered this restructuring (of the VBA in my MsAccess
> project), but I suppose it will take some focused effort to get it done...
'Twas ever thus!

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org