Excel cambia los números largos vba
Con una macro puedo importar datos de un archivo pdf, lo cual lo hace bien, pero los números largos los cambia, ejemplo: "6190001720123656" lo pasa a 6190001720123650, es decir le pone un 0 al final, la macro es la siguiente:
Sub ImportaTablaWord()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim objWord As Word.Application, wdDoc As Word.Document
Dim fila As Long, col As Long, cr As Long, conta As Integer, ti As Integer, tt As Integer
On Error Resume Next
Set A = Sheets(ActiveSheet.Name)
A.Cells.Clear
fila = 2
col = 1
conta = 0
nom = ActiveWorkbook.Name
pto = InStr(nom, ".")
nomarch = Left(nom, pto - 1)
ruta = ThisWorkbook.Path & "\" & nomarch & ".pdf"
uf = A.Range("A" & Rows.Count).End(xlUp).Row
Set objWord = CreateObject("Word.Application")
objWord.DisplayAlerts = wdAlertsNone
objWord.Visible = True
Set wdDoc = objWord.Documents.Open(ruta)
With wdDoc
tt = wdDoc.Tables.Count
For x = 1 To tt
With .Tables(x)
For f = 1 To .Rows.Count
For c = 1 To .Columns.Count
A.Cells(fila, c) = WorksheetFunction.Clean(.Cell(f, c).Range.Text)
Next c
fila = fila + 1
Next f
End With
conta = conta + 1
fila = fila + 2
Next x
End With
wdDoc.Close
MsgBox ("Se han importado " & conta & " tablas de Word a Excel"), vbInformation, "AVISO"
objWord.Quit
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub