
Copy from doc to doc with vb6
How can I copy a peace of one Word-document
into another Word-document with VB6 and NOT
destroy the format.
I have a SUB like this where OldDoc and NySkab is
globally declared as New WORD.Document:
Sub Converter(S As String, Fn As String)
Dim TempDoc As New Word.Document
Set TempDoc = NySkab
Set OldDoc = WrdApp.Documents.Open(S & Fn, , , , , , , , , , , False)
TempDoc.Range = OldDoc.Range ' here is the problem !!!!!!!!!
OldDoc.SaveAs S & "SIK " & Fn
TempDoc.SaveAs S & Fn
Set TempDoc = Nothing
Set OldDoc = Nothing
End Sub
I think I need something like this to COPY to clipboard:
Selection.WholeStory
Selection.MoveLeft wdCharacter, 1, wdExtend ' not the last paragraph
Selection.Copy
but how can I make the 'Selection' a selection in my OldDoc ?
and how shall I paste the clipboard in my TempDoc ?
--
Keld S?rensen
Denmark