Don't show buttons in print mode

L

liakamai

Is there a way to make buttons invisible when a document is printing?

This code works to make my buttons invisible but I can't seem to get a
hold of the print event;

Sub ButtonsVisible(bNotVisible As Boolean)

Dim oShape As Word.InlineShape
' bVisible = False
For Each oShape In ActiveDocument.InlineShapes
If oShape.OLEFormat.ProgID = "Forms.CommandButton.1" Then

If bNotVisible Then

With oShape
With oShape
.Height = 1
.Width = 1
End With
End With
Else
With oShape
If .OLEFormat.Object.Caption = "X" Then
.Height = 21
.Width = 17.25
Else
.Height = 19.5
.Width = 48
End If

End With

End If
End If
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top