To change the mouse pointer from Outlook form code

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,

I've got a command button on the Outlook command bar launching a time
consuming process and want to prompt the user with a message and
change the mouse pointer.

I've found some help on Sue Moshers "Developer learning center" on
www.outlookcode.com/d/tips/changepointer.htm but it's not really doing
the stuff.
Admittedly, it's probably because I'm not grasping the logic of
ModifiedFormPages. As my code is called from Outlook panel, I've no
customized pages to work on, thus can't set the property of a
modifiedFormPage ... or can I?

Does anyone know of a way to display a message, without creating a
userform.

Sue's code said:
Sub CommandButton1_Click()
Set objPage = Item.GetInspector.ModifiedFormPages("P.2")

' set pointer to hourglass
objPage.MousePointer = 11

' do something that takes a long time
' YOUR CODE GOES HERE

' when it's done, reset pointer
objPage.MousePointer = 0
Set objPage = Nothing
End Sub
 
That's correct. If you don't have a customized page, you can't work with its
properties. I imagine something might be done with lower level Windows
programming, but I'm not sure of the details. Maybe Ken can jump in
Does anyone know of a way to display a message, without creating a
userform.

I don't understand what you mean. "Userform" is a VBA/VB concept. Outlook
messages don't use VBA to display.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Does anyone know of a way to display a message, without creating a
Sorry, I wasn't being clear about the message. What I want to do is to
display a message without halting the program. Something like
"Working ... Please wait"

and finish of with a VBA message box, something like
"msgbox "Finished", vbOKOnly+vbInformation"

Thanks a lot for any input.
Mike
 
Back
Top