Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Create word document using FileMaker PHP - API.

Featured Replies

I am trying to create new word document using Filemaker PHP - API.

My Code is as follows:

<?php

set_time_limit(0);

try

{

ini_set("com.allow_dcom","true");

$word = new COM("word.application") or die ("couldnt create an instance of word");

print "loaded , word version{$word->version}";

//bring word to the front

$word->visible = 1;

//open a word document

$word->Documents->Add();

//add some text to the document

$word->Selection->TypeText("this is some sample text in the document");

///$word->Selection->InlineShapes->AddPicture(".imageschart.png");

//save the document as sampleword.doc

$word->Documents[1]->SaveAs("c:sampleword.doc");

//close word

$word->Quit();

//free object resources

$word->Release();

$word = null;

echo "done.";

}

catch(com_exception $x)

{

echo $x;

}

?>

I am getting following error:

exception 'com_exception' with message 'Failed to create COM object `word.application': Server execution failed ' in C:InetpubwwwrootNRCuploadReportDemoLast.php:7 Stack trace: #0 C:InetpubwwwrootNRCuploadReportDemoLast.php(7)}:( com->com('word.applicatio...') #1 {main}

Please guide to run this code.

Edited by Guest

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.