Word OLE Error 5151 Occurred while running a MS Word Mail Merge with FTP Remote Command Server - Support

Word OLE Error 5151 Occurred while running a MS Word Mail Merge with FTP Remote Command Server

From Support

Jump to: navigation, search
If you have a question or seek clarification, please call Technical Support.

Problem:

Customer gets the following error in their job log when trying to run the FTPRUNPC command with the MERGELETTERPRINT directive to automatically print the document after the merge completes:

                       Additional Message Information                         
                                                                              
Message ID . . . . . . :   CPF9898       Severity . . . . . . . :    40         
Message type . . . . . :   Escape                                              
Date sent  . . . . . . :   06/25/02      Time sent  . . . . . . :    16:18:05   
                                                                              

FTP Command Error: 500 MS Word OLE error: 5151 The document name or path is not valid..

Cause . . . . . : This message is used by application programs as a general escape message.


The MS Word "File/Save As" dialog is also displayed in Word after this error occurs.

Solution:

Make sure the correct template file name and mail merge data file names are being passed to the FTPRUNPC command. These parameters must contain a valid PC file name for the template and the mail merge data file.

Personal tools