Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi gays,
I designed the next sentence, what makes this script is to read data from a flat file.
but the problem is when the text string is the letter Ñ (eñe).
Can you help me how to attack this problem??? Thanks gays
-------------------------------------------------------------------------------------------------------------------------------------------------------------
sub loadtextfileCUSPP
fileName = ActiveDocument.Variables("archivocuspp").GetContent.String
dim objTXT
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(fileName) Then
Set objTextFile = objFSO.OpenTextFile(fileName, ForReading)
set f = ActiveDocument.Fields("AFP_CUSPP")
set fv = f.GetNoValues
'GetSelectedValues
'GetNoValues
Dim row
intRow = 1
intCount = 0
Do Until objTextFile.AtEndOfStream
fv.Add
fv(intCount).Text = objTextFile.Readline
'right( objTextFile.Readline,8)
'msgbox fv(intCount).Text
'fv(intCount).IsNumeric = false
intRow = intRow + 1
intCount = intCount + 1
Loop
f.SelectValues fv
msgbox "Carga de CUSPP realizada con exito !!!"
else
msgbox "No se encontro archivo " & fileName
end if
-------------------------------------------------------------------------------------------------------------------------------------------------------------
end sub
Helpmeeee please !!!!
Miguel Angel Baeyens helpme please