INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

COM and Automation

A sample form for outlook email handling by ramani
Posted: 30 Jun 03 (Edited 30 Jun 03)

*********************************************************
** Author : Ramani (Subramanian.G)
**          FoxAcc Software / Winners Software
**          ramani_g@yahoo.com
** Type   : Freeware with reservation to Copyrights
** Warranty : Nothing implied or explicit
*********************************************************
** How to Run..
** 1. Save the following code as oLook.PRG
** 2. From within your PRG call it with code ..
**    DO oLook
** 3. You need : Outlook 2000 installed in your system.
******************************************************

Public oform1
oform1=createobject("form1")
oform1.Show
Return
******************************************************
Define Class form1 As Form

    Height = 400
    Width = 620
    DoCreate = .T.
    Caption = "Form1"
    Name = "Form1"

    Add Object cmdExit As CommandButton With ;
        Top = 330, ;
        Left = 504, ;
        Height = 27, ;
        Width = 84, ;
        Caption = "E\<xit", ;
        Name = "CmdExit"

    Add Object cmdCalendar As CommandButton With ;
        Top = 330, ;
        Left = 12, ;
        Height = 27, ;
        Width = 84, ;
        Caption = "\<Calendar", ;
        Name = "CmdCalendar"

    Add Object cmdInBox As CommandButton With ;
        Top = 330, ;
        Left = 108, ;
        Height = 27, ;
        Width = 84, ;
        Caption = "\<In Box", ;
        Name = "CmdInBox"

    Add Object cmdSent As CommandButton With ;
        Top = 330, ;
        Left = 204, ;
        Height = 27, ;
        Width = 84, ;
        Caption = "\<Sent Mail", ;
        Name = "CmdSent"

    Add Object cmdContact As CommandButton With ;
        Top = 330, ;
        Left = 300, ;
        Height = 27, ;
        Width = 84, ;
        Caption = "\<AddressBook", ;
        Name = "CmdContact"

    Add Object cmdNewMail As CommandButton With ;
        Top = 360, ;
        Left =12 , ;
        Height = 27, ;
        Width = 84, ;
        Caption = "New \<Mail", ;
        Name = "cmdNewMail"

    Add Object cmdNewTask As CommandButton With ;
        Top = 360, ;
        Left =108 , ;
        Height = 27, ;
        Width = 84, ;
        Caption = "New \<Task", ;
        Name = "cmdNewTask"

    Add Object cmdNewContact As CommandButton With ;
        Top = 360, ;
        Left =204 , ;
        Height = 27, ;
        Width = 84, ;
        Caption = "\<New Contact", ;
        Name = "cmdNewContact"

    Add Object cmdNewAppointment As CommandButton With ;
        Top = 360, ;
        Left =300 , ;
        Height = 27, ;
        Width = 110, ;
        Caption = "New A\<ppointment", ;
        Name = "cmdNewAppointment"

    Add Object olecontrol1 As OleControl With ;
        Top = 12, ;
        Left = 12, ;
        Height = 306, ;
        Width = 588, ;
        Name = "Olecontrol1", ;
        OleClass = "OVCtl.OVCtl.1"

    Procedure cmdExit.Click
       Thisform.Release()
    Endproc

    Procedure cmdNewMail.Click
       Thisform.olecontrol1.NewMessage()
    ENDPROC

    Procedure cmdNewTask.Click
       Thisform.olecontrol1.NewTask()
    Endproc

    Procedure cmdNewContact.Click
       Thisform.olecontrol1.NewContact()
    ENDPROC

    Procedure cmdNewAppointment.Click
       Thisform.olecontrol1.NewAppointment()
    Endproc

    Procedure cmdCalendar.Click
       Thisform.olecontrol1.Folder = "CALENDAR"
       Thisform.Caption = "OutLook Calendar"
       Thisform.Refresh()
    Endproc

    Procedure cmdInBox.Click
       Thisform.olecontrol1.Folder = "INBOX"
       Thisform.Caption = "OutLook InBox"
       Thisform.Refresh()
    Endproc

    Procedure cmdSent.Click
       Thisform.olecontrol1.Folder = "SENT ITEMS"
       Thisform.Caption = "OutLook Sent Items"
       Thisform.Refresh()
    Endproc

    Procedure cmdContact.Click
       Thisform.olecontrol1.Folder = "CONTACTS"
       Thisform.Caption = "OutLook Address Book"
       Thisform.Refresh()
    Endproc

    Procedure olecontrol1.Init
       This.Folder = "InBox"
    Endproc

Enddefine
******************************************************
** EOF
******************************************************

Evaluate this to make others know how useful is this


Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close