Hi Assaf1978,
I'm using word 2007. I tried to save as .mht (single file).
I need to open this in microsoft internet explorer.
OK, I see now what you're talking about.
The following code will loop through the document and disable
all checkbox controls:
Sub DisableActiveXObjects()
Dim doc As Word.Document
Dim ils As Word.InlineShape
Dim shp As Word.Shape
Set doc = ActiveDocument
For Each ils In doc.InlineShapes
DisableActiveX ils
Next
For Each shp In doc.Shapes
DisableActiveX shp
Next
End Sub
Sub DisableActiveX(oShp As Object)
Dim ctl As MSForms.Control
Dim chk As MSForms.CheckBox
If oShp.Type = msoFreeform Then '5
'In case the type isn't a checkbox. Avoids "Type
mismatch" error.
On Error Resume Next
Set chk = oShp.OLEFormat.Object
On Error GoTo 0
If Not chk Is Nothing Then
chk.Enabled = False
End If
End If
End Sub
The question is, when/how should it be triggered. Can you
explain a bit more how you expect such documents to be used?
What kind of steps do you think users will be following when
they work with such a document?
You could, for example, replace Word's built-in Save As
command with your own. It would also be possible to have a
separate button for saving as a web-page...
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun
17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail