Open Word document through Iframe

  • Thread starter Thread starter Peter
  • Start date Start date
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>";
 
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?
 
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.
 
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.
 
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.
 
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.
 
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.

--------------------
 
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
 
Back
Top