Open Word document through Iframe

P

Peter

I have the following code which is executed from a modal web page - it works
fine on most, but on some computers the Word loads into memory but never
displays. This occurs with IE6 and IE7, but always works on FireFox.
When I close the modal web page Word disappears from Memory.

I don't know where the problem is, my code, IE setup or intranet security, I
also do not know where and for what to look for - I've tried Google but I
don't know what to look for so I am getting millions of hits.

I any ideas will be appreciated.

(I get same results with Excel as with Word)

string officeDocScript = "<div>"
+ "<iframe width=\"75%\" height=\"55%\" name=\"fframe\" src=\"" + filePath +
"\">"
+ "<frame width=\"75%\" height=\"55%\" name=\"fframe\" src=\"" + filePath +
"\">"
+ "<embed src=\"" + filePath + "\">"
+ "</iframe></div>";
 
S

S.M. Altaf [MVP]

What do you mean by "loads into memory but never displays"? Are you getting
a download prompt on some machines instead of the .doc file being displayed?
 
P

Peter

I get "Open", "Save","Cancel" dialog box

and if I click on "Open" the prompt just disappears and the document does
not display. If I look at the task manger the WINWORD.EXE is one of the
processes. If I close the webpage WINDWORD disaplears from the processes.
 
S

S.M. Altaf [MVP]

The file is getting to your machine just fine. It's how your browsers are
handling it that's your problem. Some browsers/machines may be configured
to use the MS Word plugin to display the DOC file and some aren't. Those
that aren't will obviously (and helpfully) prompt the user to
save/open/cancel.

Go to file types in Windows Explorer, DOC, Advanced. You should see the
advanced edit file type dialog box, there should be a checkbox there that
says "Display file in same window" or something similar. That should get
your DOC files displaying within the browser.
 
P

Peter

Actualy the documents are RTF format, but registerd to Word.
When I look at the Advanced properties the "Brows in the same window" is
disabled. It's disabled on the system that does not work and it's disabled
on the system that works.
 
F

Fernando Rodriguez

That's probably not it, but why you got a <frame> tag inside the iframe??

I see that it's not even closed, so it's possible that WORD is being loaded
into the invisible frame and the other frame is prompting you to download on
the other systems. That would be why nothing opens when click "Open" on the
download dialog, because there's already an instance of WORD loaded on the
invisible frame.
 
S

Steven Cheng [MSFT]

Hi Peter,

is this problem the same with the former modal dialog one or another
separate issue within the same application? It seems this problem is quite
client-side specific and occurs sporadically which makes the
troubleshooting rather difficult.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
P

Peter

It was registry problem on client side, I just don't know why it works with
FireFox but not IE

Here's the registry fix:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.8]
@="Microsoft Office Word 97 - 2003 Document"
BrowserFlags"=dword:00000008
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Sheet.8]
@="Microsoft Excel Worksheet"
"BrowserFlags"=dword:00000008
 
Joined
Jan 17, 2011
Messages
1
Reaction score
0
Hi,

I have a related question to this subject. When I opened a word document in an IFRAME, I can perfectly read it. However when I type some text and want to save it, I push the save button, but nothing is saved. I get no error message, it just is not saved. Does anybody has an idea why it is not saved. Maybe security reasons? But then the save button should have been disabled.

I am open for any suggestions.
Thanks in advance,
Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top