RBS,
Nicely done.
Regards,
Jim Cone
San Francisco, USA
"RB Smissaert"
<
[email protected]>
wrote in message
This code will dump them all in the sheet:
Sub ShowAllFaceID()
Dim CBC As CommandBarControl
Dim i As Long
Dim n As Long
Dim c As Long
Dim strSpacer As String
Dim lFaceIDCount As Long
Dim sh As Shape
Application.ScreenUpdating = False
Application.Cursor = xlWait
strSpacer = "~" & String(3, Chr(32))
Cells.Clear
'get rid of the old FaceID's first
'---------------------------------
For Each sh In ActiveSheet.Shapes
sh.Delete
Next
Set CBC = _
CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlButton, _
temporary:=True)
Do
If i Mod 12 = 0 Then
n = n + 1
c = 1
Else
c = c + 1
End If
i = i + 1
On Error GoTo ERROROUT
CBC.FaceId = i
On Error Resume Next
CBC.CopyFace
If Err.Number = 0 Then
Cells(n, c) = strSpacer & i
ActiveSheet.Paste Cells(n, c)
Else
Err.Clear
End If
Application.StatusBar = _
" Dumping all Office FaceID's in sheet, please wait ... " & i
Loop
ERROROUT:
CBC.Delete
With ActiveSheet.DrawingObjects
.ShapeRange.ScaleWidth 1.28, msoFalse, msoScaleFromTopLeft
.ShapeRange.ScaleHeight 1.28, msoFalse, msoScaleFromTopLeft
Range(Cells(1), Cells(n, 1)).RowHeight = .ShapeRange.Height
End With
Range(Cells(1), Cells(n, 12)).Columns.AutoFit
With Application
.ScreenUpdating = True
.Cursor = xlDefault
.StatusBar = False
End With
End Sub
RBS