Home All Groups Group Topic Archive Search About

Displaying a generated picture in MS Word

Author
27 Jun 2009 6:44 AM
Jeff
Hi

asp.net .3.5

anyone here know if it's possible to display a. .aspx generated picture
inside MS  Ofice (LIke Word, Outlook etc), if then I would like to know
how.. I whould be very happy if someone could tell me there exists a markup
language I can use. So that I can make a script, then paste this script into
my document and it displays the .aspx generated image...

any suggestions?

Author
27 Jun 2009 8:44 AM
Mark Rae [MVP]
"Jeff" <it_consulta***@hotmail.com.NOSPAM> wrote in message
news:uzC98Kv9JHA.4376@TK2MSFTNGP04.phx.gbl...

> anyone here know if it's possible to display a. .aspx generated picture
> inside MS Ofice (LIke Word, Outlook etc), if then I would like to know
> how.. I whould be very happy if someone could tell me there exists a
> markup language I can use. So that I can make a script, then paste this
> script into my document and it displays the .aspx generated image...

Please explain precisely what you mean by ".aspx generated picture"...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Are all your drivers up to date? click for free checkup

Author
27 Jun 2009 9:02 AM
Jeff
I mean an .aspx page which don't output any html code, but inside it outputs
an image, for example an jpeg...

in the code behind for that .aspx page this code is used to make the
picture:
Response.ContentType = picture.MimeType;
Response.BinaryWrite(picture.FileBytes);

The .aspx don't contain a form or any tags expect the <@ page tag at the top
of the .aspx page...

you see what I mean?
Author
27 Jun 2009 9:36 AM
Mark Rae [MVP]
"Jeff" <it_consulta***@hotmail.com.NOSPAM> wrote in message
news:eHRGAYw9JHA.1336@TK2MSFTNGP05.phx.gbl...

>I mean an .aspx page which doesn't output any HTML code, but inside it
>outputs an image, for example an jpeg...
>
> In the code behind for that .aspx page this code is used to make the
> picture:
> Response.ContentType = picture.MimeType;
> Response.BinaryWrite(picture.FileBytes);
>
> The .aspx doesn't contain a form or any tags expect the <@ page tag at the
> top of the .aspx page...

OK, so then what? Are you expecting the .aspx page to create the image and
then create a Word document and then insert the image into the Word
document...?


--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Author
27 Jun 2009 9:47 AM
Jeff
No, the user creates the Word document, then he insert this .aspx image into
the document

It would be much cooler if some markup/ script exists, which when applied to
the document then it would show the .aspx image inside the word document.

Example:
User creates a Word document, then he paste in this markup/script which I
have to make.. and then this . aspx generated image is displayed inside his
word document...
Author
27 Jun 2009 10:09 AM
Mark Rae [MVP]
"Jeff" <it_consulta***@hotmail.com.NOSPAM> wrote in message
news:u5tyKxw9JHA.1492@TK2MSFTNGP03.phx.gbl...

> No, the user creates the Word document, then he insert this .aspx image
> into the document

So save the image somewhere on the network and email the user a hyperlink...

> It would be much cooler if some markup/ script exists, which when applied
> to the document then it would show the .aspx image inside the word
> document.
>
> Example:
> User creates a Word document, then he paste in this markup/script which I
> have to make.. and then this . aspx generated image is displayed inside
> his word document...

I think you are making things far more complicated than they need to be...
Inserting an image into a Word document is a simple matter of a few mouse
clicks - no markup or script required...

Alternatively, Word has a very function-rich programming language which
could be used to create the image directly - no need for ASP.NET at all...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Author
27 Jun 2009 11:44 AM
Jeff
I see, in the end I want to create a website (asp.net) which store
information users want displayed inside their document. So after
distributing the document the user can still update this information on the
document, because he updates the information stored on the website...

The website provide the user with markup to display this information in
documents

that's why I was looking for markup/script to display image inside a word
document
Author
27 Jun 2009 12:04 PM
Mark Rae [MVP]
"Jeff" <it_consulta***@hotmail.com.NOSPAM> wrote in message
news:OvLmdyx9JHA.4944@TK2MSFTNGP02.phx.gbl...

> I see, in the end I want to create a website (ASP.NET) which stores
> information users want displayed inside their document. So after
> distributing the document the user can still update this information on
> the document, because they update the information stored on the website...
>
> The website provides the user with markup to display this information in
> documents.
>
> That's why I was looking for markup/script to display image inside a word
> document

1) The ASP.NET website creates images and saves them in a publicly
accessible location e.g. http://www.sanctuaryrig.co.uk/images/logo-hi.jpg

2) The user opens a Word document and clicks Insert, Picture - in the
Filename box, they type the above URL.

This displays the image in Word. If the image is updated, it will be
automatically updated in Word.

No markup is required - what else do you want?


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Bookmark and Share