i want to edit the ip address in a remote desktop connection file, but it is a unicode file, when i read the file using line input then write it back out as a new rdp file it saves as unicode, but the text is ansi so it displays as weird characters
i can convert the file to ansi so it diplays correctly, but i would prefer to keep it in the unicode
Code:Open "mytest.rdp" For Input As 1
Do While Not EOF(1)
i = i + 1
Line Input #1, strln
If i = 6 Then
lnarr = Split(strln, ":")
lnarr(2) = vastip
strln = Join(lnarr, ":")
End If
rdpstr = rdpstr & strln & vbNewLine
Loop
Close 1
Open "mytest2.rdp" For Output As 1
Print #1, rdpstr ' Mid(rdpstr, 3), will save the file as ANSI
Close 1
