Jump to content

Browser Hangs when generating word document


spersad

Recommended Posts

Hey guys can anyone assist me. When i generate a word document from the browser it takes a really long time and sometimes even hangs the browser. I have office installed on Windows server 2008 and i am accessing it from a client running windows Xp. The following is the code I am using:

 

 

exec("taskkill /F /IM WINWORD.exe");

 

 

$word = new MSWord();

$word->Open($template_file);

$word->WriteBookmarkText("FILENUMBER",$filenumber);

$word->WriteBookmarkText("ADDRESS",$address);

$word->WriteBookmarkText("DATE",$date);

$word->WriteBookmarkText("NAME",$name);

$word->WriteBookmarkText("SUBJECT",$subject);

          $word->SaveAs($output);

$word->Quit();

$word = NULL;

unset($word);

exec("taskkill /F /IM WINWORD.exe");

 

                        print("1. Data Saved Successfully.<br/>");

print("2. Click <a href='$output' target=_blank>here</a> to view the letter created<br/>");

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.