473,729 Members | 2,344 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 13288
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 currently have is: I am trying to figure out what response.redirectlocation does - without much...
1
1332
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 types supported by CMS? Where can I find samples regarding CMS?
0
874
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 to a different page
4
2657
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 have played around with the System.Web.Services.Protocols.SoapDocumentMethodAttribute, but no luck....
0
1468
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
7386
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 offering to open or save the attached file. This SHOULD be possible using a multipart MIME format -...
0
1395
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 methods simply return a single value as the content of the <respelement (integer or string). However...
4
7472
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 accordingly. Now, the way to replace the current document with a new one used to be easy and...
3
2822
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, line 18 The HTTP headers are already written to the client browser. Any HTTP header modifications...
0
9426
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9200
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8148
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2163
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.