Start a conversation

Generate word document for download

In any application, create a PhP button.

Within the button place codes:

[field_id] = {field_id};

Put the globals variables in "Out" mode.


Create a blank application:

Put the code below in the OnExecut Event:


//content that appears in the word document

$content = 'doc Id: '.[field_id].'doc name: '.[field_name_doc];

//doc type
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-type: application/msword");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=".$file_name);
header("Content-Transfer-Encoding: binary ");

echo $content;


When you run the application:

Choose files or drag and drop files
Was this article helpful?
  1. Ronyan Alves

  2. Posted
  3. Updated