B
bonnie.tangyn
Dear all
I want to replace string which is stored in buffer. For example, the
buffer contains a word student. I want to replace it by teacher.
I used the following code to read and save data in buffer. And then,
output a binary file, which is same format as the inputted file.
Sub ProcessBinaryFile()
Dim inFh As Integer, outFh As Integer
Dim buffer As String
inFh = FreeFile
Open "c:\template5.h5t" For Binary As #inFh
buffer = Space(LOF(inFh))
Get #inFh, , buffer
Close #inFh
outFh = FreeFile
Open "c:\outputtemplate.h5t" For Binary As #outFh
Put #outFh, , buffer
Close #outFh
End Sub
Please give me some suggestion.
Cheers Bon
I want to replace string which is stored in buffer. For example, the
buffer contains a word student. I want to replace it by teacher.
I used the following code to read and save data in buffer. And then,
output a binary file, which is same format as the inputted file.
Sub ProcessBinaryFile()
Dim inFh As Integer, outFh As Integer
Dim buffer As String
inFh = FreeFile
Open "c:\template5.h5t" For Binary As #inFh
buffer = Space(LOF(inFh))
Get #inFh, , buffer
Close #inFh
outFh = FreeFile
Open "c:\outputtemplate.h5t" For Binary As #outFh
Put #outFh, , buffer
Close #outFh
End Sub
Please give me some suggestion.
Cheers Bon