Gruppe
Extern
Problem
Die in Zeile B1 genannte Datei soll in eine Unicode-Datei konvertiert werden.
StandardModule: Modul1
Sub SaveAsUniCode()
Dim arr() As String
Dim iCounter As Integer
Dim sText As String, sPath As String
sPath = Range("B1").Value
Close
Open sPath For Input As #1
Do Until EOF(1)
Line Input #1, sText
iCounter = iCounter + 1
ReDim Preserve arr(1 To iCounter)
arr(iCounter) = StrConv(sText, vbUnicode)
Loop
Close
Open sPath For Output As #1
For iCounter = 1 To UBound(arr)
Print #1, arr(iCounter)
Next iCounter
Close
End Sub