| Code level: advanced Code area: Outlook Form Design Printer Friendly Version | ||
| Title: Set default form for a folder using CDO 1.21 | ||
| Description: This sample uses CDO 1.21 to set the default form for a folder. It does not do any checking to determine whether such a form actually exists. | ||
| Date: 29-Jun-2006 14:10 | ||
| Code level: advanced | ||
| Code area: Outlook Form Design | ||
| Posted by: Sue Mosher | ||
| Body: |
||
| All 10comments |
| Page [ 1 ] | ||
|
|
Sue Mosher
29-Jun-2006 14:13
Notes on the code: 1) This code requires a reference in the project to the Collaboration Data Objects (CDO 1.21) library. This is an optional component of Outlook 2003 and earlier versions and available as a separate download for Outlook 2007. See http://www.outlookcode.com/d/cdo.htm 2) Sample VBA usage: SetDefaultFormFolder Application.ActiveExplorer.CurrentFolder, "IPM.Appointment.ThisLocation", "This Location" 2) |
|
|
|
Cristian Vergara
01-Sep-2006 09:55
Hola 1) Los procedimientos con CDO como realizas la llamada a objeto???? lo llamas desde las referencias para que te carge alguna libreria en especifica???? yo Trabajo con las mapi pero mi duda es de que si tu con CDO te puedes conectar directamente a otra bandeja que no sea la bandeja de entrada. 2) al utilizar Set cdoFld = cdoSession.GetFolder(fld.EntryID, fld.StoreID) te crea la identidad + storeid tu como puedes comprobar que Mapi trabaje independiente de la bandeja del Outlook??? porfa favor de responder |
|
|
|
Sue Mosher
01-Sep-2006 11:49
When used in Outlook VBA, as this sample was designed to do, the CDO Session uses the same mail profile as the Outlook session, and thus has access to exactly the same folders as the Outlook session. CDO, of course, also supports invoking Session.Logon with arguments that pass the server and alias names, so that you can log onto any mailbox and get whatever access there that the logged in Windows user has. Don't forget that the machine needs to have CDO 1.21 installed or this code won't work. |
|
|
|
Sue Mosher
07-May-2007 21:53
For an Outlook 2007 version that doesn't use CDO, see http://www.outlookcode.com/codedetail.aspx?id=1594 |
|
|
|
Jim
08-Aug-2007 09:56
Sue, Any reason this code would not work as vbscript inside of a windows installer package? I got the code working outside of the installer package (by just double clicking the vbs file) -- but once the file get incorporated into the windows installer package it fails on the following line Set objSession = CreateObject("MAPI.Session") I'm thinking it may be security related?? Thanks, Jim |
|
|
|
Sue Mosher
08-Aug-2007 11:00
Jim, if CDO 1.21 is not already installed on the machine, that statement would fail. |
|
|
|
Sue Mosher
08-Aug-2007 11:52
Ah, you have it running in a standalone script but not in the installer package. Sorry, but I don't know anything about running code from a Windows Installer package. Scripting would generally be considered less secure, so I don't think it's a security issue. |
|
|
|
Alon Hirsch
03-Mar-2008 03:22
Hi, I have several computers that do not have CDO installed, and don't want to force the users to install CDO in order for my application to work. What would the code look like if I were to use Outlook Redemption 4.4.x from Dmitry Streblechenko ? |
|
|
|
Sue Mosher
03-Mar-2008 08:01
Using Redemption, you'd return an RDOFolder object using any of the methods listed at http://www.dimastr.com/redemption/rdo/RDOFolder.htm and then use its Fields collection, just as you would CDO's. |
|
|
|
werkilla
03-Mar-2009 10:09
Should I put this code in ThisOutlookSession module? And where do I call this procedure from? Thank you! |
|
| Page [ 1 ] | ||
| Post your comment name email |
