T
Tweedie
I am trying to Display a Word document and some custom buttons on a single
web page. The idea is to allow the user to edit the document manually, then
press an HTML button to save it and to initiate some additional
functionality. The code below shows that I am using Frames, and displaying
the Word document in one frame, and the Buttons.html file in the other. I do
not want to use the Word save button, but I want to call the Word save method
from code in the Buttons.html page. I know that I can access html pages in a
frame from a different frame, but do not know how to access the Word document
(or more specifically - it's object model). The "msgbox
cstr(Parent.Frames(0).name)" code will return the name of the frame with the
word doc, so I have been trying to use the Parent.Frames(0) object to no
avail.
Ideally I want my Button2_click sub to invoke the "save" method on the Word
document.
Any help or pointers will be gratefully accepted (or an alternative way to
do this??).
Thanks,
Ken
+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
Code for main page
+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
<frameset rows="5*, *">
<frame name="WordDoc" src="WordDoc.doc">
<frame name="Buttons" src="buttons.html">
</frameset>
+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
Code for buttons.html
+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
<html>
<script LANGUAGE="VBScript">
<!--
Sub Button2_onclick
msgbox cstr(Parent.Frames(0).name)
'I want to save the word document here!!!
' and then continue on with other functions
End Sub
-->
</script>
<body>
<input id="Button2" type="button" value="Click Me To Save Word Doc"
name="Button2">
</body>
</html>
web page. The idea is to allow the user to edit the document manually, then
press an HTML button to save it and to initiate some additional
functionality. The code below shows that I am using Frames, and displaying
the Word document in one frame, and the Buttons.html file in the other. I do
not want to use the Word save button, but I want to call the Word save method
from code in the Buttons.html page. I know that I can access html pages in a
frame from a different frame, but do not know how to access the Word document
(or more specifically - it's object model). The "msgbox
cstr(Parent.Frames(0).name)" code will return the name of the frame with the
word doc, so I have been trying to use the Parent.Frames(0) object to no
avail.
Ideally I want my Button2_click sub to invoke the "save" method on the Word
document.
Any help or pointers will be gratefully accepted (or an alternative way to
do this??).
Thanks,
Ken
+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
Code for main page
+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
<frameset rows="5*, *">
<frame name="WordDoc" src="WordDoc.doc">
<frame name="Buttons" src="buttons.html">
</frameset>
+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
Code for buttons.html
+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
<html>
<script LANGUAGE="VBScript">
<!--
Sub Button2_onclick
msgbox cstr(Parent.Frames(0).name)
'I want to save the word document here!!!
' and then continue on with other functions
End Sub
-->
</script>
<body>
<input id="Button2" type="button" value="Click Me To Save Word Doc"
name="Button2">
</body>
</html>