Vba - Opening Outlook with Vba
Hi all,
I am keep trying to generate an MS Outlook Task from Excel Vba. I thought I can first open Outlook, and then trying to generate task o note. First of all, could anybody help me with the first step, opening M Outlook? Iam trying this code unsuccessfuly: (I use Outlook 03 with Xp prof) Private Sub OpeningOutlook() Dim OutLk As Application Dim B As String B = "C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" Set Out = GetObject(B) OutLk.Application.Open OutLk.Application.Visible = True 'Here generating task or note OutLk.Parent.Windows(1).Visible = True OutLk.Application.Quit End Sub Thank you all! Aldo -- Message posted from http://www.ExcelForum.com |
Vba - Opening Outlook with Vba
Dim olApp as Object On Error Resume Next Set olApp = GetObject(,"Outlook.Application") If olApp Is Nothing Then Set olApp = CreateObject("Outlook.Application") End If -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ajliaks " wrote in message ... Hi all, I am keep trying to generate an MS Outlook Task from Excel Vba. I thought I can first open Outlook, and then trying to generate task or note. First of all, could anybody help me with the first step, opening MS Outlook? Iam trying this code unsuccessfuly: (I use Outlook 03 with Xp prof) Private Sub OpeningOutlook() Dim OutLk As Application Dim B As String B = "C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" Set Out = GetObject(B) OutLk.Application.Open OutLk.Application.Visible = True 'Here generating task or note OutLk.Parent.Windows(1).Visible = True OutLk.Application.Quit End Sub Thank you all! Aldo. --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 11:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com