Access Memo Fields being truncated when imported in Form Fields.

Hi,

I have a Mail Merge Document that contains { FORMTEXT } Form Fields corresponding to all of the .MailMerge.DataSource.DataFields values in my document.  I run the following code to populate the { FORMTEXT } Form Fields with my MERGE data:

'Fills Form Fields with data from matching MergeFields:
Dim mmdf As MailMergeDataField

For Each mmdf In ThisDocument.MailMerge.DataSource.DataFields
    ThisDocument.FormFields(mmdf.Name).Result = ThisDocument.MailMerge.DataSource.DataFields(mmdf.Name).Value
Next


This works perfectly; however, I have noticed that when one of my DataFields is a LONG STRING, it truncates the text in my Form Field, although my Form Field is set to TEXT | UNLIMITED.  My .DataSource is a .txt file emported from Access.

Anyone know why this is and how to overcome it?

Mitchell
LVL 5
MitchellVIIAsked:
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.

GrahamSkanRetiredCommented:
This is a known problem.
Microsoft have this as a workaround:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;163192
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
MitchellVIIAuthor Commented:
Wow,

That one made my brain hurt.  Ok, how would I apply that to this code:

'Fills Form Fields with data from matching MergeFields:
Dim mmdf As MailMergeDataField

For Each mmdf In ThisDocument.MailMerge.DataSource.DataFields
    ThisDocument.FormFields(mmdf.Name).Result = ThisDocument.MailMerge.DataSource.DataFields(mmdf.Name).Value
Next

if I have an Access Memo Field called "ContactSynopsis" that is a MERGEFIELD which I want to use to populate my FORMTEXT field by the same name?  Here is their code for reference:

Sub WorkAround255Limit()
      ' Set Text1 form field to a unique string.
      ActiveDocument.FormFields("text1").Result = "****"
      If ActiveDocument.ProtectionType <> wdNoProtection Then
          ActiveDocument.Unprotect
      End If
      Selection.GoTo What:=wdGoToBookmark, Name:="Text1"
      Selection.Collapse
      Selection.MoveRight wdCharacter, 1
      Selection.TypeText (String(256, "W"))
      Selection.GoTo what:=wdGoToBookmark, Name:="Text1"
      ' Remove unique characters from Text1 form field.
      With Selection.Find
         .Execute findtext:="*", replacewith:="", replace:=wdReplaceAll
      End With
      ActiveDocument.Protect Password:="", NoReset:=True, Type:= _
         wdAllowOnlyFormFields
   End Sub

P.S., did you see my question regardind coloring table cells?   That's a toughie I think :)

M
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 Word

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.