473,320 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Response.Content Type with word document problem.

I am creating a word document from an asp page. I have no problems
actaully creating the document and creating some tables that have data
in them. I am using Response.ContentType = "application/vnd.ms-word"
to create the actual document. My problem is that I want to place a
picture (which resides on the server) into the word document as well.
However all I seem to get is the place for the image but a picture of
an "x" meaning that the picture is missing.
Any suggestions?????
Jul 19 '05 #1
5 13262
Try using fully qualified URLs for the pictures. In other words, make sure
the reference to the picture includes 'http://www.yoursite.com' at the
start.

Anthony Marchesini
"Joan" <jo******@hotmail.com> wrote in message
news:74**************************@posting.google.c om...
I am creating a word document from an asp page. I have no problems
actaully creating the document and creating some tables that have data
in them. I am using Response.ContentType = "application/vnd.ms-word"
to create the actual document. My problem is that I want to place a
picture (which resides on the server) into the word document as well.
However all I seem to get is the place for the image but a picture of
an "x" meaning that the picture is missing.
Any suggestions?????

Jul 19 '05 #2
Thanks but that didn't work either. I'm using the html to place the
picture in the word document. Something like this: <img alt
src="http://mysite.com/Pics/mypic.jpg>. Is this the problem or do I
need to use Response.Write?

Anybody please help asap. I'm desperate.

"Anthony Marchesini" <Ar******@newsgroup.nospam> wrote in message news:<uK**************@TK2MSFTNGP10.phx.gbl>...
Try using fully qualified URLs for the pictures. In other words, make sure
the reference to the picture includes 'http://www.yoursite.com' at the
start.

Anthony Marchesini
"Joan" <jo******@hotmail.com> wrote in message
news:74**************************@posting.google.c om...
I am creating a word document from an asp page. I have no problems
actaully creating the document and creating some tables that have data
in them. I am using Response.ContentType = "application/vnd.ms-word"
to create the actual document. My problem is that I want to place a
picture (which resides on the server) into the word document as well.
However all I seem to get is the place for the image but a picture of
an "x" meaning that the picture is missing.
Any suggestions?????

Jul 19 '05 #3
Try saving the file your asp code is sending. Take a look at it in a text
editor (not word) and make sure everything looks right. Rename the file
from *.doc to *.htm and view it in your browser. If the pictures don't show
up there then there's still something wrong with the html your asp page is
writing. If they *do* show in the browser but *not* in Word, then you'd be
dealing with a Word issue and you'll probably have to ask your question in
another forum.

Good luck!

- Anthony

"Joan" <jo******@hotmail.com> wrote in message
news:74**************************@posting.google.c om...
Thanks but that didn't work either. I'm using the html to place the
picture in the word document. Something like this: <img alt
src="http://mysite.com/Pics/mypic.jpg>. Is this the problem or do I
need to use Response.Write?

Anybody please help asap. I'm desperate.

"Anthony Marchesini" <Ar******@newsgroup.nospam> wrote in message

news:<uK**************@TK2MSFTNGP10.phx.gbl>...
Try using fully qualified URLs for the pictures. In other words, make sure the reference to the picture includes 'http://www.yoursite.com' at the
start.

Anthony Marchesini
"Joan" <jo******@hotmail.com> wrote in message
news:74**************************@posting.google.c om...
I am creating a word document from an asp page. I have no problems
actaully creating the document and creating some tables that have data
in them. I am using Response.ContentType = "application/vnd.ms-word"
to create the actual document. My problem is that I want to place a
picture (which resides on the server) into the word document as well.
However all I seem to get is the place for the image but a picture of
an "x" meaning that the picture is missing.
Any suggestions?????

Jul 19 '05 #4
Thanks for your help. The pictures do show in the browser. I don't
think its a problem with the html the asp page is writing because then
the picture shouldn't have shown up in the browser. I think the
problem has something to do with just trying to display an image in a
word document that was created through an asp page. The problem is
definitely with asp - maybe something with the Response.ContentType
but I'm not sure so I really don't know where else I would ask this
question. Thanks for your help though, hopefully something will turn
up. Anybody, any other suggestions.

"Anthony Marchesini" <Ar******@newsgroup.nospam> wrote in message news:<Ob**************@TK2MSFTNGP14.phx.gbl>...
Try saving the file your asp code is sending. Take a look at it in a text
editor (not word) and make sure everything looks right. Rename the file
from *.doc to *.htm and view it in your browser. If the pictures don't show
up there then there's still something wrong with the html your asp page is
writing. If they *do* show in the browser but *not* in Word, then you'd be
dealing with a Word issue and you'll probably have to ask your question in
another forum.

Good luck!

- Anthony

"Joan" <jo******@hotmail.com> wrote in message
news:74**************************@posting.google.c om...
Thanks but that didn't work either. I'm using the html to place the
picture in the word document. Something like this: <img alt
src="http://mysite.com/Pics/mypic.jpg>. Is this the problem or do I
need to use Response.Write?

Anybody please help asap. I'm desperate.

"Anthony Marchesini" <Ar******@newsgroup.nospam> wrote in message

news:<uK**************@TK2MSFTNGP10.phx.gbl>...
Try using fully qualified URLs for the pictures. In other words, make sure the reference to the picture includes 'http://www.yoursite.com' at the
start.

Anthony Marchesini
"Joan" <jo******@hotmail.com> wrote in message
news:74**************************@posting.google.c om...
> I am creating a word document from an asp page. I have no problems
> actaully creating the document and creating some tables that have data
> in them. I am using Response.ContentType = "application/vnd.ms-word"
> to create the actual document. My problem is that I want to place a
> picture (which resides on the server) into the word document as well.
> However all I seem to get is the place for the image but a picture of
> an "x" meaning that the picture is missing.
> Any suggestions?????

Jul 19 '05 #5
Create a Word document displaying the image, save it as HTML and see if
there's a difference.

Bob Barrows
Joan wrote:
Thanks for your help. The pictures do show in the browser. I don't
think its a problem with the html the asp page is writing because then
the picture shouldn't have shown up in the browser. I think the
problem has something to do with just trying to display an image in a
word document that was created through an asp page. The problem is
definitely with asp - maybe something with the Response.ContentType
but I'm not sure so I really don't know where else I would ask this
question. Thanks for your help though, hopefully something will turn
up. Anybody, any other suggestions.

"Anthony Marchesini" <Ar******@newsgroup.nospam> wrote in message
news:<Ob**************@TK2MSFTNGP14.phx.gbl>...
Try saving the file your asp code is sending. Take a look at it in
a text
editor (not word) and make sure everything looks right. Rename the
file
from *.doc to *.htm and view it in your browser. If the pictures
don't show
up there then there's still something wrong with the html your asp
page is
writing. If they *do* show in the browser but *not* in Word, then
you'd be
dealing with a Word issue and you'll probably have to ask your
question in
another forum.

Good luck!

- Anthony

"Joan" <jo******@hotmail.com> wrote in message
news:74**************************@posting.google.c om...
Thanks but that didn't work either. I'm using the html to place the
picture in the word document. Something like this: <img alt
src="http://mysite.com/Pics/mypic.jpg>. Is this the problem or do I
need to use Response.Write?

Anybody please help asap. I'm desperate.

"Anthony Marchesini" <Ar******@newsgroup.nospam> wrote in message

news:<uK**************@TK2MSFTNGP10.phx.gbl>...
Try using fully qualified URLs for the pictures. In other words,
make

sure
the reference to the picture includes 'http://www.yoursite.com' at
the
start.

Anthony Marchesini
"Joan" <jo******@hotmail.com> wrote in message
news:74**************************@posting.google.c om...
> I am creating a word document from an asp page. I have no problems
> actaully creating the document and creating some tables that have
> data
> in them. I am using Response.ContentType =
> "application/vnd.ms-word"
> to create the actual document. My problem is that I want to
> place a
> picture (which resides on the server) into the word document as
> well.
> However all I seem to get is the place for the image but a
> picture of
> an "x" meaning that the picture is missing.
> Any suggestions?????


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vinay | last post by:
Hi All: I have a frameset (right and left). In the left frame I have a listbox that contains items. When the user clicks on any one of these items (each item points to either a word document or...
1
by: Sunil Menon | last post by:
Dear All, I stumbled upon an article on "Content Management Server"...but got a bit confused...i would like to know if "Content Management Server" can.. 1. Show me a Word Document in a browser...
0
by: Simon_Keep | last post by:
Hi, I am working on a web site that allows the user to download each page as a Word document. When the user initiates the download a popup window opens which returns the Word doc to the user...
4
by: Jit Prasad | last post by:
I have been consuming a IBM Websphere (Java) web service using .Net 1.0 front end writen in VB.NET. The proxy class submits a soap request and gets a soap response. When I migrated the front-end...
0
by: Alex Radice | last post by:
Hello, We have an application that has a WebDAV interface which office applications (and other applications which understand WebDAV) can use to open and edit documents. We are having a...
6
by: john | last post by:
The standard method to transmit a file from an aspx page to a browser is to stream the file to the response then end the response. The HTML code generated by the aspx page is discarded, and the...
0
by: SimonDev | last post by:
Hi I've got an unusual problem I'm hoping someone could advise me on, regarding the formatting of the body of an HTTP response from a web service. We are using HTTP POST rather than SOAP for...
4
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole...
3
by: new214 | last post by:
heya all, ive got abit of a problem. Im doin a system in asp- which works on a test server- but when on moving my application to a development server- it throws the following error messages where I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.