Hi everybody,
Sorry, I do not speak dutch but I used Google Translation to understand the thread containg the following post by the user member : E v R
This is the post I am enquiring about.. I couldn't add this question there because the thread is now locked
http://www.helpmij.nl/forum/showthread.php/893233-Klembord-overvol-melding-bij-afsluiten/page4
As shwon in the picture below taken with inspect.exe , the highlighted "effacer tout" button which is the french for Clear All button is not the 3rd child of the clipboard parent .. I am confused with EvR's code.
So my question is : Where are the child indexes 1,3,0,3 located in the screenshot picture below ? How did he find the correct child indexes ? The child indexes seem to contradict their hyerarchical locations in the picture below !
Sorry, I do not speak dutch but I used Google Translation to understand the thread containg the following post by the user member : E v R
Code:
Private Declare Function AccessibleChildren Lib "oleacc" (ByVal paccContainer As Office.IAccessible, ByVal iChildStart As Long, ByVal cChildren As Long, ByRef rgvarChildren As Any, ByRef pcObtained As Long) As Long
Sub ClearOfficeClipBoard()
Dim Acc As Office.IAccessible
With Application
.CommandBars("Office Clipboard").Visible = True
DoEvents
Set Acc = .CommandBars("Office Clipboard").accChild(1)
Set Acc = zetAcc(Acc, 3)
Set Acc = zetAcc(Acc, 0)
Set Acc = zetAcc(Acc, 3)
Acc.accDoDefaultAction 2&
.CommandBars("Office Clipboard").Visible = False
End With
End Sub
Private Function zetAcc(myAcc As Office.IAccessible, myChildIndex As Long) As Office.IAccessible
Dim ReturnAcc As Office.IAccessible
Dim Count As Long, List() As Variant
Count = myAcc.accChildCount
ReDim List(Count - 1&)
If AccessibleChildren(myAcc, 0&, ByVal Count, List(0), Count) = 0& Then Set zetAcc = List(myChildIndex)
End Function
This is the post I am enquiring about.. I couldn't add this question there because the thread is now locked
http://www.helpmij.nl/forum/showthread.php/893233-Klembord-overvol-melding-bij-afsluiten/page4
As shwon in the picture below taken with inspect.exe , the highlighted "effacer tout" button which is the french for Clear All button is not the 3rd child of the clipboard parent .. I am confused with EvR's code.
So my question is : Where are the child indexes 1,3,0,3 located in the screenshot picture below ? How did he find the correct child indexes ? The child indexes seem to contradict their hyerarchical locations in the picture below !
Laatst bewerkt: