spersad Posted February 4, 2009 Share Posted February 4, 2009 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/>"); Link to comment https://forums.phpfreaks.com/topic/143764-browser-hangs-when-generating-word-document/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.