|
では、こんなもんでどうでしょうか。^d^
Sub test()
Dim myRange As Range
Dim myCell As Range
Dim myPath As String
Dim N As Integer
Dim D As String
Dim A As Variant
Set myRange = Range("A1", Range("A65536").End(xlUp))
For Each myCell In myRange.Cells
myPath = myCell.Value
N = FreeFile
Open myPath For Input As #N
D = InputB(LOF(N), N)
D = StrConv(D, vbUnicode)
Close #N
A = Split(D, vbCrLf)
A(5) = myCell.Offset(, 1).Value
D = join(A, vbCrLf)
N = FreeFile
Open myPath For Output As #N
Print #N, D;
Close #N
Next
Set myCell = Nothing
Set myRange = Nothing
End Sub
|
|