Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error in code opening Outlook

Hi,

I'm getting an error on another line that is supposed to open Outloo
and save add an appointment to the users calendar. The code is below.

The Private Sub cmdSave_Click() is highlighted as well as the Di
objApp as Outlook.Application.

Thanks in advance for your help.

Jeff

Private Sub cmdSave_Click()

Dim wb As Workbook

Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objAppointment As Outlook.AppointmentItem
Dim s As String, st As String, str As String, stri As String, strin A
String

On Error Resume Next
Set objApp = GetObject(, "Outlook.Application")
If Err.Number Then Set objApp = CreateObject("Outlook.Application")
On Error GoTo

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Error in code opening Outlook

Jeff,

It sounds like you need to set a reference to the Outlook object libarary
(VBE - Tools - References), but you don't say which error you get. See also
http://www.dicks-clicks.com/excel/olBinding.htm

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com


Hi,

I'm getting an error on another line that is supposed to open Outlook
and save add an appointment to the users calendar. The code is below.

The Private Sub cmdSave_Click() is highlighted as well as the Dim
objApp as Outlook.Application.

Thanks in advance for your help.

Jeff

Private Sub cmdSave_Click()

Dim wb As Workbook

Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objAppointment As Outlook.AppointmentItem
Dim s As String, st As String, str As String, stri As String, strin As
String

On Error Resume Next
Set objApp = GetObject(, "Outlook.Application")
If Err.Number Then Set objApp = CreateObject("Outlook.Application")
On Error GoTo 0


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error in code opening Outlook

Thanks. That is the error that I'm getting because the reference isn'
set in Excel '97. Excel 2000 users were not having the problem. I'l
try to change the code based on the link you provided.

Thanks again.

Jef

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop opening outlook in excel bill s Excel Discussion (Misc queries) 2 September 23rd 09 10:16 PM
Opening outlook in Excel chrisnsmith Excel Discussion (Misc queries) 1 February 28th 09 02:46 AM
Error opening Outlook 2002 cornucopia tours Excel Discussion (Misc queries) 1 February 23rd 07 07:54 PM
Opening Excel Files from Outlook Marilyn Excel Discussion (Misc queries) 4 October 23rd 06 03:18 PM
Excel Attachments not opening in Outlook gish Excel Discussion (Misc queries) 1 June 6th 06 09:49 PM


All times are GMT +1. The time now is 04:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"