Pages

Showing posts with label Outlook. Show all posts
Showing posts with label Outlook. Show all posts

Tuesday, December 21, 2010

Sending email with Powerbuilder

Several months ago, I posted the article which explain how to create Outlook Calendar Appointment with Powerbuilder. One of the reader asked me to how if  we want to send an email with Powerbuilder via Microsoft Outlook.

Well, several years ago, I wrote this PBL which have a window inside that can read the Address Book of Microsoft Outlook, and put as the recipients and send the email via Microsoft Outlook. Since I am not using Microsoft Outlook anymore, I don't know it will be run smoothly or not in Outlook version 2007 or 2010.

You can download it by clicking here
»»  READMORE...

Friday, August 20, 2010

Creating Outlook Calendar Appointment with Powerbuilder

Microsoft Outlook is a popular Personal Information Management application. It is part of Microsoft Office package, which many users use it. Fortunately, Microsoft, as the maker Microsoft Outlook, has prepared the SDK to allows programmers to create their own applications that can interact seamlessly into the application Microsoft Outlook

One of the Outlook's feature is Calendar which it make possible to user to create their own schedule and will remind for it. It's very useful for people who has many schedules in their life.

In this part of session, I will try to explain how to insert or create a new appointment in outlook, programmatically, with Powerbuilder. One thing you should learn and know is Outlook Object Model, which you can find at Microsoft's MSDN site


Microsoft has prepared the AppointmentItem Class which has many properties, to create a new Appointment Object in Microsoft Outlook Calendar. Some properties that are commonly used for the calendar class are: Subject, Start, Duration, and Reminder.


First, you (or PC clients) must has Microsoft Outlook installed. Then at the script, you must declare OleObject variable type, than try to create the object and connect to Microsoft Outlook Object. In this example, I'm using Microsoft Outlook 2007 and Powerbuilder 6.5. Here's the full script to create a new Appointment Object:


// declare OleObject variable and Constant Variable
oleobject oleOutlook
oleobject oleAppt
Constant Integer olAppointmentItem = 1

// create the Object
oleOutlook = create oleobject

// Connect To the Outlook Object
oleOutlook.ConnectToNewObject ('Outlook.Application')

// Create the Appointment Object
oleAppt = oleOutlook.CreateItem (olAppointmentItem)

// Set some common properties of Appointment Object
oleAppt.Location = "Home"
oleAppt.Subject = "Watch Fulham vs Manchester United Live"
oleAppt.Start = "08/21/2010 19:00"
oleAppt.ReminderMinutesBeforeStart = 1  // in minute
oleAppt.Duration = 120 // in minute
oleAppt.Body = "Go MU !!! Go !!!"

// Save the Appointment
oleAppt.Save



And here the result of the example:









»»  READMORE...