N
NJ
When using Wordmail, the commandbar which contains the accounts button is
inside of a panel. Does anyone know to get or set the account being used to
send an email?
I've been looking at the following but haven't really gotten too far:
Dim p() As Process = Process.GetProcessesByName("WinWord")
Dim hWnd As IntPtr = FindWindowEx(p(0).MainWindowHandle, Nothing,
"MsoCommandBarDock", "MsoDockTop")
Dim hWnd2 As IntPtr = FindWindowEx(hWnd, Nothing, "MsoCommandBar", "Envelope")
Dim hwnd3 As IntPtr = FindWindowEx(hWnd2, Nothing, "#32770", "")
Dim hwnd4 As IntPtr = FindWindowEx(hwnd3, Nothing, "MsoCommandBar", "MSO
Generic Control Container")
Dim intVal As Integer = Int32.Parse("FFFFFFF0",
Globalization.NumberStyles.AllowHexSpecifier)
Dim cmdBar As Microsoft.Office.Core.CommandBarsClass
Dim retVal As Integer = AccessibleObjectFromWindow(hwnd4,
intVal, Nothing, cmdBar)
In theory you can get the commandbar by using the
AccessibleObjectFromWindow, but I'm not sure what I should be passing into
that method!
inside of a panel. Does anyone know to get or set the account being used to
send an email?
I've been looking at the following but haven't really gotten too far:
Dim p() As Process = Process.GetProcessesByName("WinWord")
Dim hWnd As IntPtr = FindWindowEx(p(0).MainWindowHandle, Nothing,
"MsoCommandBarDock", "MsoDockTop")
Dim hWnd2 As IntPtr = FindWindowEx(hWnd, Nothing, "MsoCommandBar", "Envelope")
Dim hwnd3 As IntPtr = FindWindowEx(hWnd2, Nothing, "#32770", "")
Dim hwnd4 As IntPtr = FindWindowEx(hwnd3, Nothing, "MsoCommandBar", "MSO
Generic Control Container")
Dim intVal As Integer = Int32.Parse("FFFFFFF0",
Globalization.NumberStyles.AllowHexSpecifier)
Dim cmdBar As Microsoft.Office.Core.CommandBarsClass
Dim retVal As Integer = AccessibleObjectFromWindow(hwnd4,
intVal, Nothing, cmdBar)
In theory you can get the commandbar by using the
AccessibleObjectFromWindow, but I'm not sure what I should be passing into
that method!