I got a command button to insert and resize an image (company logo). When printing I want this command button to be hidden, but the logo has of course to be visible. My problem is that if the command button is hidden, then the logo is hidden as well. I couldn't come up with a code that hides the command button while keeping the logo visible. I have also tried using Toggle Field Codes but had the same problem... Any ideas?
Here's the code so far (which works well):
Dim oShp As Shape
'Select and insert the Pic
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select image files and click OK"
.Filters.Add "Images", "*.gif; *.jpg; *.jpeg; *.bmp; *.tif; *.png"
.FilterIndex = 2
If .Show = -1 Then
Set oShp = ActiveDocument.Shapes.AddPicture( _
FileName:=.SelectedItems(1), _
LinkToFile:=False, _
SaveWithDocument:=True, _
Left:=5, _
Top:=12)
With oShp
.LockAspectRatio = msoCTrue
.Width = InchesToPoints(2)
End With
Else
End If
End With