A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Shared Calendar Folder Error Message



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 5th 06, 07:16 AM posted to microsoft.public.outlook.program_forms
Safal
external usenet poster
 
Posts: 28
Default Shared Calendar Folder Error Message


Hi, I can acess a shared calendar folder via Ms Outlook 2003. I am trying to
get the values of the same via a script shown below -

But each time i run the script i get the following pop-up on my outlook window
"A program is trying to access email......."
"If this is unexpected it may be a Virus......."
Allows acess with a checkbox shows

If i click "No" the script ends. Why this behaviour ? And how can one avoid
the same ?

Below is the code i tried for the same -

' Automation code.
Set ol = CreateObject("Outlook.Application")
Set olns = ol.GetNameSpace("MAPI")

' Get the shared calendar for a user
Set myRecipient = olns.CreateRecipient("Firstname Lastname")
myRecipient.Resolve
If myRecipient.Resolved Then
Set MyFolder2 = olns.GetSharedDefaultFolder(myRecipient, 9)
' Get the number of items in the folder.
NumItems = MyFolder2.Items.Count
' Set MyItem to the collection of items in the folder.
Set itms = MyFolder2.Items
' Loop through all of the items in the folder.
For Each itm in itms
If itm.Start "" Then MsgBox DateValue(itm.Start)
Next
Else
MsgBox "Cannot find the calendar for user"
End If
Ads
  #2  
Old December 5th 06, 01:30 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Shared Calendar Folder Error Message

See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Safal" wrote in message ...

Hi, I can acess a shared calendar folder via Ms Outlook 2003. I am trying to
get the values of the same via a script shown below -

But each time i run the script i get the following pop-up on my outlook window
"A program is trying to access email......."
"If this is unexpected it may be a Virus......."
Allows acess with a checkbox shows

If i click "No" the script ends. Why this behaviour ? And how can one avoid
the same ?

Below is the code i tried for the same -

' Automation code.
Set ol = CreateObject("Outlook.Application")
Set olns = ol.GetNameSpace("MAPI")

' Get the shared calendar for a user
Set myRecipient = olns.CreateRecipient("Firstname Lastname")
myRecipient.Resolve
If myRecipient.Resolved Then
Set MyFolder2 = olns.GetSharedDefaultFolder(myRecipient, 9)
' Get the number of items in the folder.
NumItems = MyFolder2.Items.Count
' Set MyItem to the collection of items in the folder.
Set itms = MyFolder2.Items
' Loop through all of the items in the folder.
For Each itm in itms
If itm.Start "" Then MsgBox DateValue(itm.Start)
Next
Else
MsgBox "Cannot find the calendar for user"
End If

  #3  
Old December 11th 06, 12:28 PM posted to microsoft.public.outlook.program_forms
Safal
external usenet poster
 
Posts: 28
Default Shared Calendar Folder Error Message

Hi,
I did go through the link sent by you. Well i could only conclude that I
either make sure of a 3rd party control or make use of C++ or Delphi to code
for the same. If yes please show me a few simple examples to do so.

-Safal

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Safal" wrote in message ...

Hi, I can acess a shared calendar folder via Ms Outlook 2003. I am trying to
get the values of the same via a script shown below -

But each time i run the script i get the following pop-up on my outlook window
"A program is trying to access email......."
"If this is unexpected it may be a Virus......."
Allows acess with a checkbox shows

If i click "No" the script ends. Why this behaviour ? And how can one avoid
the same ?

Below is the code i tried for the same -

' Automation code.
Set ol = CreateObject("Outlook.Application")
Set olns = ol.GetNameSpace("MAPI")

' Get the shared calendar for a user
Set myRecipient = olns.CreateRecipient("Firstname Lastname")
myRecipient.Resolve
If myRecipient.Resolved Then
Set MyFolder2 = olns.GetSharedDefaultFolder(myRecipient, 9)
' Get the number of items in the folder.
NumItems = MyFolder2.Items.Count
' Set MyItem to the collection of items in the folder.
Set itms = MyFolder2.Items
' Loop through all of the items in the folder.
For Each itm in itms
If itm.Start "" Then MsgBox DateValue(itm.Start)
Next
Else
MsgBox "Cannot find the calendar for user"
End If


  #4  
Old December 11th 06, 01:32 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Shared Calendar Folder Error Message

The Extended MAPI interface can't be used from VBScript.

This statement is the source of your problem and is totally unnecessary in Outlook custom form code:

Set ol = CreateObject("Outlook.Application")

You need to be using the intrinsic Application object:

Set ol = Application

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Safal" wrote in message ...
Hi,
I did go through the link sent by you. Well i could only conclude that I
either make sure of a 3rd party control or make use of C++ or Delphi to code
for the same. If yes please show me a few simple examples to do so.

-Safal

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.



"Safal" wrote in message ...

Hi, I can acess a shared calendar folder via Ms Outlook 2003. I am trying to
get the values of the same via a script shown below -

But each time i run the script i get the following pop-up on my outlook window
"A program is trying to access email......."
"If this is unexpected it may be a Virus......."
Allows acess with a checkbox shows

If i click "No" the script ends. Why this behaviour ? And how can one avoid
the same ?

Below is the code i tried for the same -

' Automation code.
Set ol = CreateObject("Outlook.Application")
Set olns = ol.GetNameSpace("MAPI")

' Get the shared calendar for a user
Set myRecipient = olns.CreateRecipient("Firstname Lastname")
myRecipient.Resolve
If myRecipient.Resolved Then
Set MyFolder2 = olns.GetSharedDefaultFolder(myRecipient, 9)
' Get the number of items in the folder.
NumItems = MyFolder2.Items.Count
' Set MyItem to the collection of items in the folder.
Set itms = MyFolder2.Items
' Loop through all of the items in the folder.
For Each itm in itms
If itm.Start "" Then MsgBox DateValue(itm.Start)
Next
Else
MsgBox "Cannot find the calendar for user"
End If


  #5  
Old December 18th 06, 09:28 AM posted to microsoft.public.outlook.program_forms
Safal
external usenet poster
 
Posts: 28
Default Shared Calendar Folder Error Message

The code I have below is that of a *.vbs file that i had planned to use as a
"Scheduled Task". If i need to change the same to as suggested by you its has
to be in VBA ?

"Sue Mosher [MVP-Outlook]" wrote:

The Extended MAPI interface can't be used from VBScript.

This statement is the source of your problem and is totally unnecessary in Outlook custom form code:

Set ol = CreateObject("Outlook.Application")

You need to be using the intrinsic Application object:

Set ol = Application

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Safal" wrote in message ...
Hi,
I did go through the link sent by you. Well i could only conclude that I
either make sure of a 3rd party control or make use of C++ or Delphi to code
for the same. If yes please show me a few simple examples to do so.

-Safal

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.



"Safal" wrote in message ...

Hi, I can acess a shared calendar folder via Ms Outlook 2003. I am trying to
get the values of the same via a script shown below -

But each time i run the script i get the following pop-up on my outlook window
"A program is trying to access email......."
"If this is unexpected it may be a Virus......."
Allows acess with a checkbox shows

If i click "No" the script ends. Why this behaviour ? And how can one avoid
the same ?

Below is the code i tried for the same -

' Automation code.
Set ol = CreateObject("Outlook.Application")
Set olns = ol.GetNameSpace("MAPI")

' Get the shared calendar for a user
Set myRecipient = olns.CreateRecipient("Firstname Lastname")
myRecipient.Resolve
If myRecipient.Resolved Then
Set MyFolder2 = olns.GetSharedDefaultFolder(myRecipient, 9)
' Get the number of items in the folder.
NumItems = MyFolder2.Items.Count
' Set MyItem to the collection of items in the folder.
Set itms = MyFolder2.Items
' Loop through all of the items in the folder.
For Each itm in itms
If itm.Start "" Then MsgBox DateValue(itm.Start)
Next
Else
MsgBox "Cannot find the calendar for user"
End If


  #6  
Old December 18th 06, 12:49 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Shared Calendar Folder Error Message

Too bad you didn't start out saying you were trying to automate Outlook from an external script running as a scheduled task. If you had, I would have told you:

1) Outlook is not suitable to automate from the Windows scheduler. CDO 1.21 or Redemption would be a better interface.

2) See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.

Redemption's RDO objects would solve both problems.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Safal" wrote in message ...
The code I have below is that of a *.vbs file that i had planned to use as a
"Scheduled Task". If i need to change the same to as suggested by you its has
to be in VBA ?

"Sue Mosher [MVP-Outlook]" wrote:

The Extended MAPI interface can't be used from VBScript.

This statement is the source of your problem and is totally unnecessary in Outlook custom form code:

Set ol = CreateObject("Outlook.Application")

You need to be using the intrinsic Application object:

Set ol = Application

"Safal" wrote in message ...
Hi,
I did go through the link sent by you. Well i could only conclude that I
either make sure of a 3rd party control or make use of C++ or Delphi to code
for the same. If yes please show me a few simple examples to do so.

-Safal

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.



"Safal" wrote in message ...

Hi, I can acess a shared calendar folder via Ms Outlook 2003. I am trying to
get the values of the same via a script shown below -

But each time i run the script i get the following pop-up on my outlook window
"A program is trying to access email......."
"If this is unexpected it may be a Virus......."
Allows acess with a checkbox shows

If i click "No" the script ends. Why this behaviour ? And how can one avoid
the same ?

Below is the code i tried for the same -

' Automation code.
Set ol = CreateObject("Outlook.Application")
Set olns = ol.GetNameSpace("MAPI")

' Get the shared calendar for a user
Set myRecipient = olns.CreateRecipient("Firstname Lastname")
myRecipient.Resolve
If myRecipient.Resolved Then
Set MyFolder2 = olns.GetSharedDefaultFolder(myRecipient, 9)
' Get the number of items in the folder.
NumItems = MyFolder2.Items.Count
' Set MyItem to the collection of items in the folder.
Set itms = MyFolder2.Items
' Loop through all of the items in the folder.
For Each itm in itms
If itm.Start "" Then MsgBox DateValue(itm.Start)
Next
Else
MsgBox "Cannot find the calendar for user"
End If


  #7  
Old December 19th 06, 06:14 AM posted to microsoft.public.outlook.program_forms
Safal
external usenet poster
 
Posts: 28
Default Shared Calendar Folder Error Message

Sorry about that I assumed you would recall the chain of email exchanges in
the past couple of days or threads. But then you attend to plenty of queries
so it would be diff to recall all of them
Thanks for the solution. Will try em out!.

-Safal

"Sue Mosher [MVP-Outlook]" wrote:

Too bad you didn't start out saying you were trying to automate Outlook from an external script running as a scheduled task. If you had, I would have told you:

1) Outlook is not suitable to automate from the Windows scheduler. CDO 1.21 or Redemption would be a better interface.

2) See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.

Redemption's RDO objects would solve both problems.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Safal" wrote in message ...
The code I have below is that of a *.vbs file that i had planned to use as a
"Scheduled Task". If i need to change the same to as suggested by you its has
to be in VBA ?

"Sue Mosher [MVP-Outlook]" wrote:

The Extended MAPI interface can't be used from VBScript.

This statement is the source of your problem and is totally unnecessary in Outlook custom form code:

Set ol = CreateObject("Outlook.Application")

You need to be using the intrinsic Application object:

Set ol = Application

"Safal" wrote in message ...
Hi,
I did go through the link sent by you. Well i could only conclude that I
either make sure of a 3rd party control or make use of C++ or Delphi to code
for the same. If yes please show me a few simple examples to do so.

-Safal

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.


"Safal" wrote in message ...

Hi, I can acess a shared calendar folder via Ms Outlook 2003. I am trying to
get the values of the same via a script shown below -

But each time i run the script i get the following pop-up on my outlook window
"A program is trying to access email......."
"If this is unexpected it may be a Virus......."
Allows acess with a checkbox shows

If i click "No" the script ends. Why this behaviour ? And how can one avoid
the same ?

Below is the code i tried for the same -

' Automation code.
Set ol = CreateObject("Outlook.Application")
Set olns = ol.GetNameSpace("MAPI")

' Get the shared calendar for a user
Set myRecipient = olns.CreateRecipient("Firstname Lastname")
myRecipient.Resolve
If myRecipient.Resolved Then
Set MyFolder2 = olns.GetSharedDefaultFolder(myRecipient, 9)
' Get the number of items in the folder.
NumItems = MyFolder2.Items.Count
' Set MyItem to the collection of items in the folder.
Set itms = MyFolder2.Items
' Loop through all of the items in the folder.
For Each itm in itms
If itm.Start "" Then MsgBox DateValue(itm.Start)
Next
Else
MsgBox "Cannot find the calendar for user"
End If



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Calendar on Shared Folder Lisa Outlook - Calandaring 1 September 21st 06 02:06 PM
SHARED CALENDAR - OPERATION FAILED ERROR [email protected] Outlook - General Queries 3 August 31st 06 03:25 PM
Get a shared default calendar folder with CDO Lucia Outlook and VBA 0 August 25th 06 06:58 PM
Shared Calendar Forms error Transam388 Outlook - Calandaring 3 March 9th 06 09:52 PM
Error Message When Compacting Folder Dale Outlook Express 5 February 27th 06 08:30 PM


All times are GMT +1. The time now is 03:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.