Word linked images

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have the following script:

$fp = fopen("docs/test3.doc","w+");
fwrite($fp,"Content-Type: application/vnd.ms-word\n");
fwrite($fp,"Expires: 0");
fwrite($fp,"Cache-Control: must-revalidate, post-check=0, pre-
fwrite($fp,"content-disposition: attachment;filename=test3.doc");

$invoice = "
  <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
  <html lang=\"en\">
  <meta http-equiv=\"content-type\" content=\"text/html;
    <table style=\"width:100%;float:left;\" border=2>
      <tr style=\"width:100%;height:85px;\">
        <td style=\"float:left;width:49%;text-align:left\">
        <img src=\"http://www.xxx.com/images/logo.jpg\">
        <td style=\"float:right;width:49%;text-align:right;bottom:
        <img src=\"http://www.xxx.com/images/invoice.jpg\">

print "$invoice";

This works fine and converts & saves me a .doc file. However if that
file was moved to a computer which was not connected to the web
continuously, then my images wouldnt load. If you go into Word > Edit
Quoted text here. Click to load it

My question is it possible to force Word in advance to not link to the
images but download them as well?

Many thanks


Re: Word linked images

UKuser wrote:

Quoted text here. Click to load it

Yes -- create a proper Word file and include the images in it.

You are *not* creating a Word file -- you're creating an HTML file
that you're tricking (some) browsers into opening with Word.

Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux, up 13 days, 2:53.]

                      Sharing Music with Apple iTunes

Site Timeline