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 / Outlook / Programming VBA / October 2004

Tip: Looking for answers? Try searching our database.

To change the mouse pointer from Outlook form code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 29 Sep 2004 09:48 GMT
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
Sue Mosher [MVP-Outlook] - 29 Sep 2004 12:11 GMT
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.

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Hi,
>
[quoted text clipped - 27 lines]
>  Set objPage = Nothing
> End Sub
Mike - 07 Oct 2004 11:08 GMT
> > Does anyone know of a way to display a message, without creating a
> > userform.

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

> 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
[quoted text clipped - 34 lines]
> >  Set objPage = Nothing
> > End Sub
Sue Mosher [MVP-Outlook] - 29 Oct 2004 14:42 GMT
An alternative method would be to use the Popup method from Windows Script
Host. See http://www.winguides.com/scripting/reference.php?id=144

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

>> > Does anyone know of a way to display a message, without creating a
>> > userform.
[quoted text clipped - 48 lines]
>> >  Set objPage = Nothing
>> > End Sub
 
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.