OTWarrior
10-09-2007, 03:58 AM
I keep getting the message "string too long" when trying to import form another file (from table cells into form fields) using my custom procedure:
Public Sub Import_TEST()
Set CurrentDoc = Word.Application.Documents(1)
With Dialogs(wdDialogFileOpen)
If .Display <> -1 Then
Exit Sub
Else
Set BrowseFile = Word.Application.Documents.Open _
(WordBasic.FileNameInfo$(.Name, 1), , , , , , , , , , , False)
End If
CurrentDoc.FormFields("Form1").Result = _
LineFeedStripper(Replace((BrowseFile.Tables(7).Cell(5, 5)), "", ""))
end with
end sub
Now the cell contains more than 256 characters, and I need to import it (along with the rest of the document). Is there a data type that can accept more than 256 characters? or a better way of importing large ammounts of text to be inputting into a form field?
Public Sub Import_TEST()
Set CurrentDoc = Word.Application.Documents(1)
With Dialogs(wdDialogFileOpen)
If .Display <> -1 Then
Exit Sub
Else
Set BrowseFile = Word.Application.Documents.Open _
(WordBasic.FileNameInfo$(.Name, 1), , , , , , , , , , , False)
End If
CurrentDoc.FormFields("Form1").Result = _
LineFeedStripper(Replace((BrowseFile.Tables(7).Cell(5, 5)), "", ""))
end with
end sub
Now the cell contains more than 256 characters, and I need to import it (along with the rest of the document). Is there a data type that can accept more than 256 characters? or a better way of importing large ammounts of text to be inputting into a form field?