String Parameter too Long
    • Dark
      Light
    • PDF

    String Parameter too Long

    • Dark
      Light
    • PDF

    Article summary

    Issue: 5854: String Parameter too long. Error returned when first merging in Word document

    Analysis: This error typically indicates that worksheets with range names have been copied into the current workbook. Microsoft Excel copies the path of the source workbook and duplicates all range names. This creates extremely long references that word is unable to parse.

    Correction: Check the Name Manager in Excel for external references and delete.

    1. Open the Name Manager in Excel → Formulas Ribbon → Name Manager

    2. Click to sort by the “Refers to” column

    3. Scroll and search for references to a drive, for instance C:\, containing an external file path

    4. Highlight all external references and delete - Be careful as inadvertent deletion of range names cannot be undone.

    5. Save and Prep the Excel file and attempt the Merge again

    Prevention: Always utilize Merge Workbooks when copying worksheets from another workbook to prevent issues with duplicating range names. This utility was created to workaround Microsoft Excel’s mis-management of range names.


    Was this article helpful?