Während der Arbeit in Range
eines anderen Dokuments TCN.docx
bekomme ich Fehler method or data member not found
auf rng.MoveRight unit:=Cell
Position.Wechsel zur nächsten Zelle in einem anderen Dokument
Sub TNC()
Dim odoc As Document
Dim rng As Word.Range
Set odoc = Documents.Open(filename:="C:\Users\Bilal\Desktop\TCN.docx", Visible:=True)
Set rng = odoc.Content
rng.Find.ClearFormatting
rng.Find.Font.Bold = True
With rng.Find
.Text = "BU"
.Forward = True
.Wrap = wdFindStop
.Format = True
End With
rng.Find.Execute
If rng.Find.Found = True Then
rng.MoveRight unit:=Cell **ERROR position**
rng.COPY
Else
End If
odoc.Close wdDoNotSaveChanges
Selection.PasteAndFormat (wdPasteDefault)
End Sub
für ein besseres Verständnis