newbie46
asked on
Is there a way to get around 255 character limit of text stored in Word table cell from Access 2007 VBA?
I am using the following code to write text from Access 2007 to a Word document:
Set rw = doc.Tables(4).Rows.Add
With rw
.Cells(1).Range.Text="Text longer than 255 characters"
.Cells(2).Range.Text = "Next column of info"
End with
The text is truncated at 255 characters.
Is there a way to get around this?
Set rw = doc.Tables(4).Rows.Add
With rw
.Cells(1).Range.Text="Text
.Cells(2).Range.Text = "Next column of info"
End with
The text is truncated at 255 characters.
Is there a way to get around this?
ASKER
When I compile, I get an error stating that data member not found. When I type .Cells(1).Range., Value isn't one of the options in the dropdown.
sry, I meant Cells(1).Value="Text longer than 255 characters"
ASKER
After typing in Cells(1)., Value is not in the dropdown. It gives the same error.
I just tested this line in a word document and it works fine:
ActiveDocument.Tables(1).R ows(1).Cel ls(1).Rang e.Text = String(1000, "a")
Do you get your cell content from a memo field? If yes, please post the code where you open the recordset.
ActiveDocument.Tables(1).R
Do you get your cell content from a memo field? If yes, please post the code where you open the recordset.
ASKER
The cell content is from a memo field. The code is:
strSQL = "SELECT DISTINCT Requirements " & _
"FROM TempTable "
Set rs = db.OpenRecordset (strSQL, dbOpenDynaset)
strSQL = "SELECT DISTINCT Requirements " & _
"FROM TempTable "
Set rs = db.OpenRecordset (strSQL, dbOpenDynaset)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!! I'll find a workaround for the Distinct.
.Cells(1).Range.Value="Tex