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?
newbie46Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Stephan_SchrandtCommented:
Try to use the value property:
 .Cells(1).Range.Value="Text longer than 255 characters"
0
newbie46Author Commented:
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.
0
Stephan_SchrandtCommented:
sry, I meant Cells(1).Value="Text longer than 255 characters"
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

newbie46Author Commented:
After typing in Cells(1)., Value is not in the dropdown. It gives the same error.
0
Stephan_SchrandtCommented:
I just tested this line in a word document and it works fine:

ActiveDocument.Tables(1).Rows(1).Cells(1).Range.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.
0
newbie46Author Commented:
The cell content is from a memo field. The code is:

strSQL = "SELECT DISTINCT Requirements " & _
                "FROM TempTable " 

Set rs = db.OpenRecordset (strSQL, dbOpenDynaset)
               
0
Stephan_SchrandtCommented:
The problem is your distinct. Every comparison (including distinct) cuts the memo to 255. See http://allenbrowne.com/ser-63.html for a detailed explanation.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
newbie46Author Commented:
Thanks!! I'll find a workaround for the Distinct.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.