Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

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?????

Report this thread to moderator Post Follow-up to this message
Old Post
Joan
09-22-04 08:55 PM


Re: Response.Content Type with word document problem.
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" <jojo1098@hotmail.com> wrote in message
news:748ac99f.0409220928.759d05db@posting.google.com...
> 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?????



Report this thread to moderator Post Follow-up to this message
Old Post
Anthony Marchesini
09-23-04 01:55 AM


Re: Response.Content Type with word document problem.
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" <Arm07470@newsgroup.nospam> wrote in message news:<uKRxabOoEHA.3324@TK
2MSFTNGP10.phx.gbl>...
> Try using fully qualified URLs for the pictures.  In other words, make sur
e
> the reference to the picture includes 'http://www.yoursite.com' at the
> start.
>
> Anthony Marchesini
>
>
> "Joan" <jojo1098@hotmail.com> wrote in message
> news:748ac99f.0409220928.759d05db@posting.google.com... 

Report this thread to moderator Post Follow-up to this message
Old Post
Joan
09-23-04 08:55 PM


Re: Response.Content Type with word document problem.
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" <jojo1098@hotmail.com> wrote in message
news:748ac99f.0409231117.5b0e9c61@posting.google.com...
> 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" <Arm07470@newsgroup.nospam> wrote in message
news:<uKRxabOoEHA.3324@TK2MSFTNGP10.phx.gbl>... 
sure 



Report this thread to moderator Post Follow-up to this message
Old Post
Anthony Marchesini
09-24-04 08:55 AM


Re: Response.Content Type with word document problem.
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" <Arm07470@newsgroup.nospam> wrote in message news:<ObTDo#foEHA.2304@TK
2MSFTNGP14.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 sh
ow
> 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 b
e
> dealing with a Word issue and you'll probably have to ask your question in
> another forum.
>
> Good luck!
>
> - Anthony
>
> "Joan" <jojo1098@hotmail.com> wrote in message
> news:748ac99f.0409231117.5b0e9c61@posting.google.com... 
>  news:<uKRxabOoEHA.3324@TK2MSFTNGP10.phx.gbl>... 
>  sure 

Report this thread to moderator Post Follow-up to this message
Old Post
Joan
09-24-04 08:55 PM


Re: Response.Content Type with word document problem.
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" <Arm07470@newsgroup.nospam> wrote in message
> news:<ObTDo#foEHA.2304@TK2MSFTNGP14.phx.gbl>... 

--
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"



Report this thread to moderator Post Follow-up to this message
Old Post
Bob Barrows [MVP]
09-24-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:17 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.