Word in IE Container: Always asks to save... 
Author Message
 Word in IE Container: Always asks to save...

Hi All,

I am opening a word document within Internet Explorer, basically
opening Word 97 and using IE 5.5 as the container.  (By setting the
mime type to application/msword).

I edit the document, and then I have a macro that runs, saves the
documet somewhere on the disk, and then should close word and the ie
container.

It appears that IE does not know that the document was saved, even if
I use "ActiveDocument.saved = true".  I always get a prompt that asks
if I want to save the document before I close.

The code I'm using to close is:
response = MsgBox("Your changes have been saved." + vbCrLf + "Would
you like to close Word?", vbYesNo, "Successfully saved!")
If response = vbYes Then
  ActiveDocument.Container.Quit
End If

If I simply run the same code in word (no ie container), I do not get
a save prompt - it appears to know that the document has been saved.

How can I edit the document and then close word without any propmts
asking me to save when opened in an IE container?

-Adam



Sat, 29 Jan 2005 04:50:53 GMT  
 Word in IE Container: Always asks to save...

maybe try examining the container's properties for a dirty flag of
some sort. Just guessing.


like this:

Quote:
>Hi All,

>I am opening a word document within Internet Explorer, basically
>opening Word 97 and using IE 5.5 as the container.  (By setting the
>mime type to application/msword).

>I edit the document, and then I have a macro that runs, saves the
>documet somewhere on the disk, and then should close word and the ie
>container.

>It appears that IE does not know that the document was saved, even if
>I use "ActiveDocument.saved = true".  I always get a prompt that asks
>if I want to save the document before I close.

>The code I'm using to close is:
>response = MsgBox("Your changes have been saved." + vbCrLf + "Would
>you like to close Word?", vbYesNo, "Successfully saved!")
>If response = vbYes Then
>  ActiveDocument.Container.Quit
>End If

>If I simply run the same code in word (no ie container), I do not get
>a save prompt - it appears to know that the document has been saved.

>How can I edit the document and then close word without any propmts
>asking me to save when opened in an IE container?

>-Adam

Steve Hudson -- Word Heretic, Sydney, Australia
"Player One needs work... badly."
{*filter*} teacher, trainer, tutor, writer, developer

You agree by writing to me personally that any material can be reused publicly unless you explicitly disclaim it. (For List and blog use.)


Sun, 30 Jan 2005 08:56:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Stop IE asking to open/save onclick file

2. Prevent Word to ask for saving global template

3. Getting Word to close a file without asking if you want to save

4. I.E. 3 ActiveX container extender properties

5. I.E. 3 ActiveX container extender properties

6. save a word document in IE using ASP.

7. tired of always having to ask questions?

8. MSRDC always asks for a username

9. Word 2002: How to save a file in Word 97 format in Word 2002

10. Ask about browers(IE or NC) question

11. Is Container IE?

12. How do I print Activex document in IE container

 

 
Powered by phpBB® Forum Software