To do this in Word VBA you'd need something like:
Code:
public Sub FilePrint()
Dim wordShape As Word.inlineshape
Dim foundControlShape As Boolean
Dim printHiddenTextState As boolean
For Each wordShape In ActiveDocument.InlineShapes
with wordShape
If .Type = wdInlineShapeOLEControlObject Then
.Range.Font.Hidden = True
foundControlShape = True
End If
end with
Next
printHiddenTextState = Application.Options.PrintHiddenText
If foundControlShape Then
Application.Options.PrintHiddenText = False
End If
Application.Dialogs(wdDialogFilePrint).Show
If foundControlShape Then
For Each wordShape in ActiveDocument.InlineShapes
With wordShape
If .Type = wdInlineShapeOLEControlObject Then
.range.Font.hidden = false
End If
End With
next
End If
application.Options.PrintHiddenText = printHiddenTextState
End Sub
Basically, you can loop through all OLE Control shapes in the document and set the hidden property of the font to True.
You may well need to beef up this code as it's only searching the body of the document for these control objects. Also, FilePrint only traps the Print option under the File menu (as well as Ctrl+P shortcut). To trap the print icon on the toolbar you'll need to declare a FilePrintDefault procedure, and do
Code:
ActiveDocument.PrintOut
rather than show the print dialog
good luck