------------------------------------------------------------------------------------------------------------ Private Sub ClickPreserve(ByVal acc As Accessibility.IAccessible) Dim i As Long Dim count As Long Dim lst() As Object
count = acc.accChildCount
If count > 0 Then ReDim lst(count - 1) AccessibleChildren(acc, 0, count, lst, 0) If Not IsNothing(lst) Then For i = LBound(lst) To UBound(lst) With lst(i) '保存ボタンを見つけたらクリック(デフォルトアクション)する If .accName(CHILDID_SELF) = "保存" Then
System.Threading.Thread.Sleep(500) .accDoDefaultAction(CHILDID_SELF) System.Threading.Thread.Sleep(500) End If End With ClickPreserve(lst(i)) '再帰 Next End If End If