sweet_dreams was telling us:
sweet_dreams nous racontait que :
> Hi all,
>
[quoted text clipped - 27 lines]
> but I tried to do it with ActiveDocument but result is the same. So
> how can I reference to currently open doc.
Do not use Selection.
What you want is something like this:
'_______________________________________
Dim docSource As Document
Dim docTarget As Document
Dim TekstOpisu As Range
Dim DlugoscTekstu As Long
Set docTarget = ActiveDocument
Set docSource = Application.Documents.Open(SciezkaKryterium(NrKryt))
'What is SciezkaKryterium(NrKryt)?
DlugoscTekstu = docSource.Characters.Count
Set TekstOpisu = docSource.Range(0, DlugoscTekstu - 1)
docTarget.Range.FormattedText = TekstOpisu.FormattedText
'_______________________________________
It is always better to declare Document objects for all the document we
intend to manipulate in our code.
I am not sure if this is what you want... but according to your own code
this will take the full text form a document and insert it (Overwriting any
existing text) in the active document.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
sweet_dreams - 01 Sep 2006 00:23 GMT
Jean-Guy Marcil,
Thanks a lot it is exactly what I wanted to achieve.
Regards,
sweet_dreams