I have an invoice.doc file and want to extract a customer email address, remove it from the doc file, add a company logo on top right, and save the file in original format using php.
Asked
Active
Viewed 444 times
2 Answers
0
MS Word saves its files in a compressed format, so you won't be able to see or edit the contents without decompressing it first. If you pop it open with a regular text editor you will know what I mean.
Your best shot would probably be to use PHPWord. Take a look at it here: http://phpword.codeplex.com/

karlingen
- 13,800
- 5
- 43
- 74
0
For old .DOC documents, to extract the e-mail you could use AntiWord. To alter the document is different story tho. Perhaps using ActiveX if you are on Windows with MS Office installed.
For new .DOCX format you do have some options, because basically the document is just a zipped XML file.

Tuncay Göncüoğlu
- 1,699
- 17
- 21