Code Comments
Programming Forum and web based access to our favorite programming groups.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?????
Post Follow-up to this messageTry 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?????
Post Follow-up to this messageThanks 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...
Post Follow-up to this messageTry 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
Post Follow-up to this messageThanks 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
Post Follow-up to this messageCreate 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"
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.