By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,022 Members | 1,372 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,022 IT Pros & Developers. It's quick & easy.

Response.Content Type with word document problem.

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.