Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Outlook 2007 Programming ISBN: 978-0-470-04994-5
This is the forum to discuss the Wrox book Professional Outlook 2007 Programming by Ken Slovak; ISBN: 9780470049945
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Outlook 2007 Programming ISBN: 978-0-470-04994-5 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old June 19th, 2009, 06:01 PM
Authorized User
Points: 457, Level: 7
Points: 457, Level: 7 Points: 457, Level: 7 Points: 457, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2004
Location: Burbank, CA, USA.
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Arsi
Unhappy Issue with commandbar with Outlook 2003

Hi there,

I wrote this a while ago and now it is no longer working. The commandbar gets created with the proper item, except when you click on it, nothing happens.

I think the problem is the following line:

_fpItems = _mapiFormsFolder1.Items
_fpItem = _fpItems.Add("IPM.Note.Custom Form")

for _mapiFormsFolder1.Items, under the ErrorCode it shows -1213988351. I've tried searching for that error, but I can't find anything about it. Any ideas what that means?

Also, I see the following message
"Item = In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user."

I don't know what to do to fix this. Any help would be greatly appreciated. Thank you in advance.


Here's the code below:

Office = Microsoft.Office.Core
Imports System.Xml
Imports System.IO
Imports System.Configuration
Imports System.Collections
Imports System.Net
publicclass ThisApplication
PrivateWithEvents _Explorers As Outlook.Explorers
PrivateWithEvents _Explorer As Outlook.Explorer
Private _mapiFormsFolder1 As Outlook.MAPIFolder
Private _fpItems As Outlook.Items
Private _fpItem AsObject
Private _helpMenuIndex AsObject
Private _topMenu As Office.CommandBarPopup
PrivateWithEvents _OpenForm As Office.CommandBarButton
Private _menuBar As Office.CommandBar
PrivateConst _MENU_BEFORE AsString = "Help"
PrivateSub ThisApplication_Startup(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Startup
_Explorer =
_mapiFormsFolder1 =
Me.ActiveExplorer().Session.GetDefaultFolder(Outlook .OlDefaultFolders.olPublicFoldersAllPublicFolders) .Folders("CORPORATE").Folders("Our Forms")
PrivateSub BuildTopMenu()
_menuBar =
_helpMenuIndex = _menuBar.Controls(_MENU_BEFORE).Index
_topMenu =
CType(_menuBar.Controls.Add(Office.MsoControlType.msoCo ntrolPopup, , , _helpMenuIndex, True), Office.CommandBarPopup)
_topMenu.Caption =
"Our Forms"
_topMenu.Visible = True
_OpenForm = CType(_topMenu.Controls.Add(Office.MsoControlType.msoCo ntrolButton, , , , True), Office.CommandBarButton)
_OpenForm.Caption =
"Custom Form"
_OpenForm.Visible = True
_OpenForm.Enabled = True
PrivateSub Menu_Click(ByVal Ctrl As Microsoft.Office.Core.CommandBarButton, ByRef CancelDefault AsBoolean) Handles _OpenForm.Click
_fpItems = _mapiFormsFolder1.Items
_fpItem = _fpItems.Add(
"IPM.Note.Custom Form")
Catch ex As Exception
PrivateSub ThisApplication_Shutdown(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Shutdown
Reply With Quote

Thread Tools
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2003 Angel_oct11 C# 2005 2 November 13th, 2007 06:08 AM
Javascript in Outlook (2003) message POTSJ Javascript How-To 2 October 10th, 2007 07:38 AM
Outlook 2003 Hunter Pro VB.NET 2002/2003 0 January 5th, 2005 05:01 PM
Popup type CommandBar in Outlook sumit_kalra Access VBA 1 September 25th, 2004 11:56 AM
Popup type CommandBar into Outlook sumit_kalra Excel VBA 0 July 10th, 2003 06:20 AM

All times are GMT -4. The time now is 02:40 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.