11.07.2015 Views

Automate Scheduler Using Macros

Automate Scheduler Using Macros

Automate Scheduler Using Macros

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 6: PropertiesUserEmail PropertySyntaxOptions.UserEmailApplies ToOptionsDescriptionSets or returns the email address of the user.DiscussionBecause this property is a string, you must enter the exact email addressfor any messaging to work properly. This email address is sent withremote server requests. The maximum length of this property is 75characters.TypeStringAccessRead/WriteExampleThis example demonstrates the use of the Options object, and itsUserEmail property.Sub Main()Dim objSchedApp As ObjectDim objOptions As ObjectSet objSchedApp = CreateObject("Cognosbatcher.Application")'set up a reference to the Options objectSet objOptions = objSchedApp.OptionsWith objOptions'UserEmail is a property of the Options objectMsgBox "<strong>Scheduler</strong> User E-Mail:" & .UserEmail'UserEmail provides read & write access.UserEmail = "jdoe@somewhere.com"'the Save method commits any alterations made to the Options'properties; if Save is not used, the changes will be lost'when the reference to the <strong>Scheduler</strong> Application object is'destroyed, or when <strong>Scheduler</strong> is closed.SaveEnd WithSet objOptions = NothingSet objSchedApp = NothingEnd Sub<strong>Automate</strong> <strong>Scheduler</strong> <strong>Using</strong> <strong>Macros</strong> 143

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!