Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / April 2008

Tip: Looking for answers? Try searching our database.

Face ID

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Beagle - 16 May 2007 20:28 GMT
Hello,

Is there a way to create a new FACE ID picture than the ones that are
already listed?
Jim Rech - 16 May 2007 21:05 GMT
You can edit a toolbutton image and you can paste a new image onto a tool
button, but you cannot add an image to Excel's built-in images accessible
via the FaceID property.  The later always refers to one of the built-in
images.

Signature

Jim

| Hello,
|
| Is there a way to create a new FACE ID picture than the ones that are
| already listed?
gc - 26 Apr 2008 17:31 GMT
> you cannot add an image to Excel's built-in images accessible via the
FaceID property.

Mn... not even if one is willing to write some code in C++ to register new
FaceIDs?

I'm asking because my Excel application creates its own toolbar and attaches
the icons to buttons using the "CommandBarButton::PasteFace()" method, but
this is not reliable.
There is another commercial application used by our users, that does
something to the Office Clipboard in the background and causes PasteFace() to
fail. To figure out what is the root of the problem I wrote a simple
subroutine that continuously copies and paste the contents of a cell
(therefore forcing objects to be added and deleted from the clipboard). When
this is running, "pasteFace" fails. It seems to me that the cause is that the
clipboard is shared by all office apps. If, between the time the icon is
copied to the clipboard and it is pasted using PasteFace, another application
upts more than 24 objects, then the icon that should be added doesn't exist
anymore and pasteface fails.

Defining new FaceId seems to me the only likely solution to this problem...
or are there other work-arounds (that don't use pasteface)?

Thanks
P.S. the code I use to fill-in the clipboard follows. I add it to a session
of excel and run it. When I open a new Excel session and open my application
that build the toolbar, none of the icons are pasted.

Option Explicit

Private Sub CommandButton1_Click()
 Dim i As Long
 Dim j As Long
 Dim numRows As Long
 
 numRows = 40
 Do While True
   j = j + 1
   For i = 1 To numRows
     Range("a1:a40")(i, 1).Select
     Selection.Copy
     Range("b1:b40")((i + j) Mod numRows + 1, 1).Select
     ActiveSheet.Paste
   Next i
 Loop
End Sub



> You can edit a toolbutton image and you can paste a new image onto a tool
> button, but you cannot add an image to Excel's built-in images accessible
[quoted text clipped - 5 lines]
> | Is there a way to create a new FACE ID picture than the ones that are
> | already listed?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.