vba bug
Hvordan fortæller man subben at den skal loope indtil der ikke er flere linier.Nedenstående finder en separator erstatter den med noget andet, og det virker men den
fortsætter ikke forbi første linie
Der er bugs i mit loop
Dette virker ikke: Loop Until EOF(filnavn)
Sub conv()
Dim filnavn As String
filnavn = ActiveDocument
Selection.HomeKey Unit:=wdStory
Selection.TypeText Text:=\"text(\"
Selection.TypeParagraph
Call find
Do
Selection.TypeText Text:=\"=\"\"\"
Selection.EndKey Unit:=wdLine
\'If EOF(filnavn) Then
\'Selection.TypeText Text:=\"\')\'\"
\'Else
Selection.TypeText Text:=\"\"\",\"
Selection.MoveDown Unit:=wdLine, Count:=1
\'End If
Loop Until EOF(filnavn)
End Sub
Sub find()
With Selection.find
.Forward = True
.ClearFormatting
.MatchWholeWord = True
.MatchCase = False
.Wrap = wdFindContinue
.Execute FindText:=\";\"
End With