Forum Moderators: open

Message Too Old, No Replies

How do you embed an Excel or Publisher document?

         

MikeBHouston

9:02 pm on Sep 19, 2003 (gmt 0)

10+ Year Member



Is it possible to embed a MS Publisher file (*.pub) into an HTML document? I've tried the same embed tag that I successfully used to embed a PDF, but it did not work.
I am working on an Intranet site that I want to display a publisher file. I do not want to export the file into HTML. I want the actual .pub to be embedded, so the data will be live.

The other problem is that the users who will have access to this Intranet are all set to Restricted in XP and cannot install plugins. So rule out a third-party pluggin viewer install for the users.

Can I use an OBJECT tag to make it work? Can someone show me to proper syntax if that would work?

So, let me restate the question here... I need a way to display a live publisher document into a webpage (active server pages, if that matters) without using client side plugins.

Anyone?

hartlandcat

9:23 pm on Sep 19, 2003 (gmt 0)

10+ Year Member



I wouldn't get your hopes up on this one. In the unlikely possibility that this could work, it would most likely only work in IE because you're talking Microsoft programmes.

MikeBHouston

9:29 pm on Sep 19, 2003 (gmt 0)

10+ Year Member



That is fine. All of our users are XP using IE6. I'm playing around with this tag, but still have not gotten it to work yet...

<OBJECT type="application/mspub" data="xxx/xxx/xxx.pub" width="571" height="400"></OBJECT>

MikeBHouston

10:07 pm on Sep 19, 2003 (gmt 0)

10+ Year Member



Update: I found an old post on another tech website that suggests using the following code:

<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width=200 height=200>
<param name="filename" value="mymovie.avi">
<embed src="mymovie.avi" width="" height="" autostart="false"></embed>
</object>

But they advised to change the CLSID to the correct Publisher number. How do I find out the right CLSID? I'd like to give this a shot, but have no idea where to begin finding the CLSID...i tried google, but no luck yet.

Should this format work?

Sylvester

10:09 pm on Sep 19, 2003 (gmt 0)

10+ Year Member



I have a link to an excel spreadsheet. When the user clicks on the link it goes to a .ASP page with the following. At first this worked for some people and not for other. Other kept getting prompted to log in ( I assmume to the server ). Anyways adding the Response.AddHeader line fixed that. Now no one is getting prompts to log in.

When the user clicks on the link, they get that generic prompt to open, save, cancel, etc. If they click on open excel opens right then and they get to see the spreadsheet. If the click save, they can down load it.

At first I was trying to make it just automatically do the excel thing. But this only worked for some. And I never figured out why. The great people here gave me some clues and this is what I ended up with. Gives users the option of open or save and works every time for all users so far. No prompts to log in.

Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename="myexcel.xls"
server.execute("myexcel.xls")

hartlandcat

6:52 am on Sep 20, 2003 (gmt 0)

10+ Year Member



All of our users are XP using IE6.

How come? Is the only people that would use it based in a certain office or something?

sun818

7:19 am on Sep 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My guess is that this will be an Intranet site. And they will make documents available for viewing. Heh, I hope you have the permissions set correctly so they can't edit the file. But to find the correct CLSID, you can snoop around your Registry. I haven't researched how the CLSIDs are assigned but they seem to unique to each application.

MikeBHouston

1:05 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



Sun818, you are correct...this is for an Intranet. I just wanted to let you all know that I tracked the CLSID down for publisher, which is 06CBF134-195C-4A0D-ADA8-9D73C158DBD9 but the embedding still did not work.

I ended up just automatically launching the document within publisher. Works like a charm. It is not embedded, but it still gets the job done.

Thanks for all of your help!