<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Reading from a Word Document with COM in PHP</title>
	<atom:link href="http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/feed" rel="self" type="application/rss+xml" />
	<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php</link>
	<description>The Adventures of Carlos d'Avis</description>
	<lastBuildDate>Mon, 06 Feb 2012 08:57:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Niva Hada</title>
		<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/comment-page-2#comment-41214</link>
		<dc:creator>Niva Hada</dc:creator>
		<pubDate>Tue, 24 Jan 2012 04:07:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.drewd.com/index.php/?p=151#comment-41214</guid>
		<description>how to give a exact path in webserver while opening a file in word document. in local it works while giving path like &quot;C:/xampp/htdocs/cms/filename.txt&quot; but how to give path to webserver.Please Help me</description>
		<content:encoded><![CDATA[<p>how to give a exact path in webserver while opening a file in word document. in local it works while giving path like "C:/xampp/htdocs/cms/filename.txt" but how to give path to webserver.Please Help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niva Hada</title>
		<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/comment-page-2#comment-41213</link>
		<dc:creator>Niva Hada</dc:creator>
		<pubDate>Tue, 24 Jan 2012 04:05:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.drewd.com/index.php/?p=151#comment-41213</guid>
		<description>how to give exact path to the webser</description>
		<content:encoded><![CDATA[<p>how to give exact path to the webser</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bapu</title>
		<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/comment-page-2#comment-41148</link>
		<dc:creator>bapu</dc:creator>
		<pubDate>Sat, 21 Jan 2012 07:38:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.drewd.com/index.php/?p=151#comment-41148</guid>
		<description>please help me.............</description>
		<content:encoded><![CDATA[<p>please help me.............</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bapu</title>
		<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/comment-page-2#comment-41147</link>
		<dc:creator>bapu</dc:creator>
		<pubDate>Sat, 21 Jan 2012 07:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.drewd.com/index.php/?p=151#comment-41147</guid>
		<description>$word = new COM(&quot;word.application&quot;) or die(&quot;Unable to instantiate Word&quot;);
$word-&gt;Documents-&gt;Open($filename);
$new_filename = substr($filename,0,-4) . &quot;.txt&quot;;
// the &#039;2&#039; parameter specifies saving in txt format

$word-&gt;Documents[1]-&gt;SaveAs($new_filename,2);
$word-&gt;Documents[1]-&gt;Close(false);
$word-&gt;Quit();
$word-&gt;Release();
$word = NULL;
unset($word);
$fh = fopen($new_filename, &#039;r&#039;);
// this is where we exit Hell

$contents = fread($fh, filesize($new_filename));
fclose($fh);
unlink($new_filename);

it ok but iam getting error is that Uncaught exception &#039;com_exception&#039; with message &#039;Failed to create COM object `word.application&#039;: Invalid syntax &#039;</description>
		<content:encoded><![CDATA[<p>$word = new COM("word.application") or die("Unable to instantiate Word");<br />
$word-&gt;Documents-&gt;Open($filename);<br />
$new_filename = substr($filename,0,-4) . ".txt";<br />
// the '2' parameter specifies saving in txt format</p>
<p>$word-&gt;Documents[1]-&gt;SaveAs($new_filename,2);<br />
$word-&gt;Documents[1]-&gt;Close(false);<br />
$word-&gt;Quit();<br />
$word-&gt;Release();<br />
$word = NULL;<br />
unset($word);<br />
$fh = fopen($new_filename, 'r');<br />
// this is where we exit Hell</p>
<p>$contents = fread($fh, filesize($new_filename));<br />
fclose($fh);<br />
unlink($new_filename);</p>
<p>it ok but iam getting error is that Uncaught exception 'com_exception' with message 'Failed to create COM object `word.application': Invalid syntax '</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bapu</title>
		<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/comment-page-2#comment-41146</link>
		<dc:creator>bapu</dc:creator>
		<pubDate>Sat, 21 Jan 2012 07:36:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.drewd.com/index.php/?p=151#comment-41146</guid>
		<description>this code ok but iam getting one error is that Uncaught exception &#039;com_exception&#039; with message &#039;Failed to create COM object `word.application&#039;: Invalid syntax &#039;</description>
		<content:encoded><![CDATA[<p>this code ok but iam getting one error is that Uncaught exception 'com_exception' with message 'Failed to create COM object `word.application': Invalid syntax '</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Felix</title>
		<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/comment-page-2#comment-38934</link>
		<dc:creator>Felix</dc:creator>
		<pubDate>Thu, 17 Nov 2011 22:17:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.drewd.com/index.php/?p=151#comment-38934</guid>
		<description>can someone post a working code here?</description>
		<content:encoded><![CDATA[<p>can someone post a working code here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/comment-page-2#comment-38634</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 03 Nov 2011 13:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.drewd.com/index.php/?p=151#comment-38634</guid>
		<description>[...]  [...]</description>
		<content:encoded><![CDATA[<p>[...]  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton</title>
		<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/comment-page-2#comment-34878</link>
		<dc:creator>Anton</dc:creator>
		<pubDate>Thu, 26 May 2011 04:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.drewd.com/index.php/?p=151#comment-34878</guid>
		<description>Hi All, just sharing

I have problem open document in a folder like
&quot;C:\sample\test file to be read by php.doc&quot; as filename.

Then i change the slash ( / ) into backslash ( \ ), and it works fine. so i change the filename as 
&quot;C:/sample/test file to be read by php.doc&quot;.</description>
		<content:encoded><![CDATA[<p>Hi All, just sharing</p>
<p>I have problem open document in a folder like<br />
"C:\sample\test file to be read by php.doc" as filename.</p>
<p>Then i change the slash ( / ) into backslash ( \ ), and it works fine. so i change the filename as<br />
"C:/sample/test file to be read by php.doc".</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mediavince</title>
		<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/comment-page-2#comment-30771</link>
		<dc:creator>mediavince</dc:creator>
		<pubDate>Thu, 21 Oct 2010 20:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.drewd.com/index.php/?p=151#comment-30771</guid>
		<description>try and use openoffice with odt files...
(to go from doc to odt if needed on linux cli: unoconv or jodconverter)

http://www.phpclasses.org/package/2586-PHP-Convert-OpenOffice-Writer-documents-to-HTML.html</description>
		<content:encoded><![CDATA[<p>try and use openoffice with odt files...<br />
(to go from doc to odt if needed on linux cli: unoconv or jodconverter)</p>
<p><a href="http://www.phpclasses.org/package/2586-PHP-Convert-OpenOffice-Writer-documents-to-HTML.html" rel="nofollow">http://www.phpclasses.org/package/2586-PHP-Convert-OpenOffice-Writer-documents-to-HTML.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaffar</title>
		<link>http://drewd.com/2007/01/25/reading-from-a-word-document-with-com-in-php/comment-page-1#comment-29161</link>
		<dc:creator>Jaffar</dc:creator>
		<pubDate>Mon, 05 Jul 2010 04:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.drewd.com/index.php/?p=151#comment-29161</guid>
		<description>I want to read  doc file  which is located in my Xampp directory ,while trying  this I got exception of Com...
It work fine when  I doc file is located on DESKTOP.....

Please Figure Out..</description>
		<content:encoded><![CDATA[<p>I want to read  doc file  which is located in my Xampp directory ,while trying  this I got exception of Com...<br />
It work fine when  I doc file is located on DESKTOP.....</p>
<p>Please Figure Out..</p>
]]></content:encoded>
	</item>
</channel>
</rss>

