473,549 Members | 2,803 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Response.Conten t 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.Conten tType = "applicatio n/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 13276
Try using fully qualified URLs for the pictures. In other words, make sure
the reference to the picture includes 'http://www.yoursite.co m' at the
start.

Anthony Marchesini
"Joan" <jo******@hotma il.com> wrote in message
news:74******** *************** ***@posting.goo gle.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.Conten tType = "applicatio n/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******@newsg roup.nospam> wrote in message news:<uK******* *******@TK2MSFT NGP10.phx.gbl>. ..
Try using fully qualified URLs for the pictures. In other words, make sure
the reference to the picture includes 'http://www.yoursite.co m' at the
start.

Anthony Marchesini
"Joan" <jo******@hotma il.com> wrote in message
news:74******** *************** ***@posting.goo gle.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.Conten tType = "applicatio n/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******@hotma il.com> wrote in message
news:74******** *************** ***@posting.goo gle.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" <Ar******@newsg roup.nospam> wrote in message

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

Anthony Marchesini
"Joan" <jo******@hotma il.com> wrote in message
news:74******** *************** ***@posting.goo gle.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.Conten tType = "applicatio n/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.Conten tType
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******@newsg roup.nospam> wrote in message news:<Ob******* *******@TK2MSFT NGP14.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******@hotma il.com> wrote in message
news:74******** *************** ***@posting.goo gle.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" <Ar******@newsg roup.nospam> wrote in message

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

Anthony Marchesini
"Joan" <jo******@hotma il.com> wrote in message
news:74******** *************** ***@posting.goo gle.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.Conten tType = "applicatio n/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.Conten tType
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******@newsg roup.nospam> wrote in message
news:<Ob******* *******@TK2MSFT NGP14.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******@hotma il.com> wrote in message
news:74******** *************** ***@posting.goo gle.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" <Ar******@newsg roup.nospam> wrote in message

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

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

Anthony Marchesini
"Joan" <jo******@hotma il.com> wrote in message
news:74******** *************** ***@posting.goo gle.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.Conten tType =
> "applicatio n/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
430
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 an image) - I'd like to show this (image or word document) in the frame on the right. Would anyone have any ideas on how I can do this? The code I...
1
1323
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 without having Word on the client machine and only on the Server? 2. If Yes....can the user edit and save the Word document? 3. What are the document...
0
867
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 as part of the response. The problem I am having is that if the user opens a Word document in the popup window and then navigates the main window...
4
2645
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 to .NET1.1, the response from the web service appears as null in the proxy class. This only happens with .NET1.1, .NET1.0 is ok and works fine. I...
0
1461
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 problem with MS Word (and Excel, haven't tested any other apps) misinterpreting the responses from the WebDAV. The sequence of events is as follows:
6
7331
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 browser displays or offers to save the binary file instead. I would like to have the browser accept and display the revised HTML code as well as...
0
1377
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 calling web methods to save network traffic over a cellular network. Each web method returns an XmlDocument with a <resproot element. Most web...
4
7454
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 new page that should replace an existing one. I.e when we issue an Ajax request we don't know what will be returned and analyze the response to act...
3
2801
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 do Response.Redirect: //messages begin---------------------------- Response object error 'ASP 0156:80004005' Header Error /Catloguesearch2.asp,...
0
7554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7751
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7511
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6088
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5396
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1087
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.