Office Developer Blog
The definitive blog for finding the latest news and code tricks for Office developers.
 

November, 2009

  • Office Developer Blog

    Developing Outlook 2010 Solutions for 32-bit and 64-bit Systems

    • 1 Comments

    This post captures and summarizes information about developing an Outlook solution for customers who run 32-bit and 64-bit versions of Outlook 2010. Since developing Outlook solutions is a very broad subject, the article gathers information from various sources, and points to some of these locations for further details.

    Bitness Compatibility Between Windows and Office 2010

    Let’s first talk about the compatibility of the bitness of Windows, Microsoft Office, and Microsoft Outlook. The term “bitness” refers to the distinction between 32-bit and 64-bit processor architectures and the associated compatibility of applications. In this blog, “bitness” is used to qualify the version of Windows, Office, Outlook, or an application built to suit a 32-bit or 64-bit processor architecture of a computer. Each Office 2010 application is available in a 32-bit version and 64-bit version. For Outlook 2010, the bitness of Outlook depends on the bitness of Windows and the bitness of any other Office application that is already installed on that computer. Here are the dependencies:

    ·         On a 32-bit Windows operating system, you can only install 32-bit Office (and 32-bit Outlook).

    ·         On a 64-bit Windows operating system, you can install either 32-bit Office (and 32-bit Outlook), or 64-bit Office (and 64-bit Outlook). The default installation of Office 2010 on 64-bit Windows is 32-bit Office (and 32-bit Outlook).

    ·         If some other Office 2010 application is already installed on a computer, then the bitness of Outlook 2010 that you will install must be consistent. For example, if a 32-bit Excel 2010 is already installed on a computer, you can only install 32-bit Outlook 2010 on that computer. Similarly, if a 64-bit Word 2010 is already installed on a computer, then you can only install 64-bit Outlook 2010.

    Default Installation Locations

    The following are the default installation locations when you install Office 2010:

    ·         For a computer running 32-bit Windows, typically the location is C:\Program Files\Microsoft Office\Office14\.

    ·         For a computer running 32-bit Office on 64-bit Windows, typically the location is C:\Program Files (x86)\Microsoft Office\Office14\.

    ·         And, for a computer running 64-bit Office, typically the location is C:\Program Files\Microsoft Office\Office14\.

    Major Categories of Outlook Solutions

    Outlook solutions fall into a few major categories:

    ·         Add-ins written in managed languages (such as C# or Visual Basic), or standalone applications and add-ins written in unmanaged languages (such as C++ or Visual Basic 6.0). Note that Microsoft no longer supports Visual Basic 6.0.

    ·         Macros written in Visual Basic for Applications (VBA).

    ·         Messaging API (MAPI) applications written in typically C++.

    The following sections describe the issues that developers of each category of Outlook solutions have to be aware of when planning the availability of their solutions for Outlook 2010.

    Managed Add-ins, and Unmanaged Applications and Add-ins for Outlook

    Basically, the way to call the Outlook object model remains the same*, regardless of whether the add-ins are going to be run on a 32-bit or 64-bit version of Outlook 2010.

    You do not need to recompile existing (32-bit) managed or unmanaged add-ins, if you expect the add-ins to continue to run only on computers with 32-bit Outlook installed.

    In particular, for existing managed add-ins, make sure that you have built them using Microsoft Visual Studio Tools for the Microsoft Office system 3.0, or Microsoft Office development tools in Visual Studio 2010, with the Any CPU option for target platform on the Build tab of the Project Properties dialog box. Add-ins built with such settings work for (both 32-bit and) 64-bit versions of Office 2010. If you used other settings, rebuild your managed add-ins using the specified settings so that they will run on computers with either 32-bit or 64-bit Outlook 2010 installed.

    Any existing unmanaged, standalone application (in .exe) that runs outside of the Outlook process written for 32-bit Outlook does not require recompilation for 64-bit Outlook, as long as the application interacts with Outlook using the Outlook object model and not MAPI. (For MAPI applications, see the section “MAPI Applications for Outlook” below.) COM manages the marshaling from the 32-bit application to 64-bit Outlook.

    However, if you expect any existing unmanaged add-in will be run on computers with 64-bit Outlook 2010, you must recompile the add-in for 64-bit Outlook 2010. To clarify, you will have one version of the add-in to run on 32-bit Outlook, and another version of the add-in to run on 64-bit Outlook. Because there is no 64-bit Visual Basic 6.0 runtime, existing unmanaged add-ins written in Visual Basic 6.0 targeting to run on 64-bit Outlook 2010 should be rewritten, for example, as a managed add-in in Visual Basic.

    *Note that even though you make calls the same way if you are targeting an add-in to run on 32-bit Outlook 2010 vs 64-bit Outlook 2010, there are changes in the Outlook 2010 object model such that, if you adapt an existing add-in to use the object model of Outlook 2010, you must be aware of the following:

    ·         Object model calls in previous versions of Outlook were based on the assumption that there was only one Exchange account per profile. This assumption is not correct in Outlook 2010, since there can be multiple Exchange accounts per profile.

    ·         Existing add-ins that modify a command bar or use Application events for shortcut menus may not work as expected in Outlook 2010. Update these add-ins to use the Office Fluent user interface extensibility. For more information, see Extending the User Interface in Outlook 2010.

     

    VBA Macros for Outlook

    If you have existing macros written for (32-bit) Outlook, and you intend to allow users to run the macros on 64-bit Outlook 2010, you will have to recompile the macros using Visual Basic for Applications 7.0 (VBA 7), and use conditional compilation to assure backward compatibility as well as compatibility with 64-bit Outlook. You will need to update any Declare statements, as well as address pointers and window handles in user-defined types used by Declare statements. If your macros use any ActiveX controls, these ActiveX controls will have to be updated for 64-bit Outlook as well. For more details, see Compatibility Between the 32-bit and 64-bit Versions of Office 2010.

    MAPI Applications for Outlook

    If your existing 32-bit MAPI application is going to be running on a computer with 64-bit Outlook installed, you will need to rebuild your 32-bit application as a 64-bit application. Outlook 2010 provides a set of MAPI header files that support MAPI applications to work with both 32-bit and 64-bit Outlook 2010. Make sure you download these header files from Outlook 2010: MAPI Header Files and rebuild your MAPI application using these header files.

    In general, the bitness of the MAPI application must be the same as the bitness of the MAPI subsystem on the computer that the application is targeted to run on. The bitness of the MAPI subsystem, in turn, is determined by and always the same as the bitness of the installed version of Outlook. So if you plan to develop a MAPI application that will be run on computers with either a 32-bit or 64-bit version of Outlook 2010 installed, you will need to build two separate versions of the application, one to work with 32-bit Outlook and one to work with 64-bit Outlook.

    For more information about MAPI support for 64-bit Outlook, see Building MAPI Applications on 32-Bit and 64-Bit Platforms.

    Aside from rebuilding MAPI applications, sometimes it's necessary to check the version of Outlook to ensure that a MAPI application calls API elements that are supported by the currently running version of Outlook.

    To learn how to check the version of Outlook and whether the installed version of Outlook is 64-bit Outlook 2010, see How to: Check the Version of Outlook.

    Also, to learn how to decipher Outlook version information and the expected values for different parts of a version string for certain released versions of Outlook, see How to determine Outlook version information.

     

     

     

  • Office Developer Blog

    Want More Office2010 Developer Content?

    • 0 Comments

    Office 2010 BetaErika Ehrli Cabral has great post about all of the new content we've published to help you get started with Office 2010 development. She also has links to the downloads so you can get the Beta!

    http://blogs.msdn.com/erikaehrli/archive/2009/11/18/getting-started-with-office-2010-development.aspx

     

  • Office Developer Blog

    Accessing Outlook Developer Help During the Office 2010 Beta Period

    • 1 Comments

    The help model in Microsoft Office 2010 for Office client applications such as Access, Excel, Outlook, and Word has remained the same as in Office 2007: when you click F1, you can choose to access help that is installed on your computer, or help available on the Office Web site.

    During the Office 2010 Beta timeframe, you can access developer help only from the computer; online developer help from the Office Web site will be set up when Office 2010 RTMs. What all of this means is that when you click F1 to view help in a client application, you should make sure that Developer Reference is selected under Content from This Computer in the drop-down menu adjacent to Search.

    In Outlook 2010 Beta, you may notice very slight discrepancies between the objects and members displayed in the object browser, and the objects and members described in the developer help that is installed on your computer by Outlook 2010 Beta. This is because the installed help was a snap shot of the developer help taken after the cut-off date for the Beta version of Outlook 2010. Even though there are some discrepancies, this version of the developer help is reasonably sufficient to provide what you need to know to use the new object model members in Outlook 2010 Beta.

    The Office Developer Documentation team has made available even more recent versions of the developer help for Access, Excel, Outlook, PowerPoint, Project, Publisher, Visio, and Word. You can download these developer references at Office 2010: Developer References. These versions of developer help are more recent snap shots, and similar to the developer help installed by Office 2010 Beta, you are likely to find discrepancies between the objects and members displayed in the object browser of the Beta product, and the objects and members described in the downloaded version of the help. Nonetheless, this downloadable help may still change between now and when Office 2010 RTMs. Meanwhile, if you are developing a solution to test against an Office 2010 Beta product, you can refer to the installed or downloadable help to learn about the product, and implement your solution based on the Beta product.

    So how do you view the versions of help that you obtain by downloading? The help files are in the same .HxS file format that shipped with Office 2007 and Office 2010 Beta. For example, an Outlook developer help file named outlook.dev.hxs was shipped with Outlook 2007 and Outlook 2010 Beta. The best way to view the help file is to use the client help viewer that is part of each Office client product.

    Follow these steps to use the client help viewer to view the most recent version of outlook.dev.hxs that you download:

    1.       Close Outlook 2010 Beta if it is open.

    2.       Search for the location of outlook.dev.hxs installed by Outlook 2010 Beta. For a computer running 32-bit Windows, typically the location is C:\Program Files\Microsoft Office\Office14\1033. For a computer running 32-bit Office on 64-bit Windows, typically the location is C:\Program Files (x86)\Microsoft Office\Office14\1033. And, for a computer running 64-bit Office, typically the location is C:\Program Files\Microsoft Office\Office14\1033.

    3.       Rename that copy of outlook.dev.hxs installed by Outlook 2010 Beta as outlook.dev.beta.hxs.

    4.       Copy the version of outlook.dev.hxs that you downloaded from Office 2010: Developer References to the location you found in step 2.

    5.       Start Outlook 2010 Beta.

    6.       Make sure that Developer Reference under Content from This Computer is selected for your client help viewer. You can now view the help you downloaded using the client help viewer.

    To view a more recent version of the developer help that you download for any of the other Office applications listed earlier, follow the same steps 1 to 6, by first closing that application, replacing the installed version of the help file by the version you downloaded, and restarting the application. Make sure that you have specified Developer Reference under Content from This Computer for the client help viewer in that application.

    For Outlook 2010 Beta, other than the developer reference, you can also view new technical articles on MSDN:

    ·         What's New for Developers in Outlook 2010. This article provides a comprehensive list of new features in the Outlook 2010 object model. 

    ·         Extending the User Interface in Outlook 2010. This article describes the numerous new ways you can customize the Outlook 2010 user interface in the Office Fluent ribbons, menus, context menus, and Office Backstage view. This article includes a sample add-in as a download.

    ·         Programming the Outlook 2010 Solutions Module. This article elaborates on the much demanded new APIs in the object model to allow add-ins to customize the Navigation Pane under a new Solutions module. This article includes a sample add-in as a download.

    ·         Shutdown Changes for Outlook 2010 Beta. This article describes important shutdown changes in Outlook 2010 Beta for add-in developers and IT administrators to ensure that Outlook shuts down quickly and consistently.

    ·         Developing an Outlook Social Connector Provider. This article describes how to implement an Outlook Social Connector (OSC) provider that connects a third-party social or professional networking site with a user in Outlook, and allows the user to view social network data from that site without having to leave Outlook. This article includes a sample provider as a download.

    The first three of these technical articles provide details and code samples in addition to related content in the Outlook 2010 Developer Reference. The last two articles currently offer the only source of documentation in their respective subject areas.

     

  • Office Developer Blog

    Developer Help Updates for Office 2010 Beta

    • 0 Comments

    In the intervening time between when we had to hand-off the Developer References to go into the Office 2010 Beta several weeks ago and now, the Office Developer Documentation team has been extremely busy adding new content about the new features. We have added hundreds of new topics to the references!

    This post describes to Office VBA developers how to make sure they are viewing the most up to date version of the developer help for the Office 2010 client applications.

    Please Pardon Our Dust!

    imageAs we gear up for the release of Office 2010, we are excited about the improvements we are making to how we deliver content updates via the Office Web site. However, as a result of that work, for the Beta we are only able to provide developer help in the “offline” mode (that is, the content is viewed locally from your hard drive). Don’t worry though, online refreshes of the developer help content will be up and running for the final release of Office 2010!

    How to Update Developer Help

    If you are a VBA developer and would like to have the latest Office 2010 Beta developer reference, just follow the steps below to update. These steps describe how to download the latest files (.HxS files), install them, and view them.

    1. Download the reference(s) from Office 2010: Developer References and extract them to a location on your computer. The download contains help builds for the following developer help content:

    • Combined Office 2010 developer references (All of the below)
    • Access 2010 Developer Reference (MSACCESS.DEV.HXS)
    • Excel 2010 Developer Reference (EXCEL.DEV.HXS)
    • Outlook 2010 Developer Reference (OUTLOOK.DEV.HXS)
    • PowerPoint 2010 Developer Reference (POWERPNT.DEV.HXS)
    • Project 2010 Developer Reference (WINPROJ.DEV.HXS)
    • Publisher 2010 Developer Reference (MSPUB.DEV.HXS)
    • Visio 2010 Automation Reference (VISIO.DEV.HXS)
    • Visio 2010 ShapeSheet Reference (VISIO.SHAPSHEET.HXS)
    • Word 2010 Developer Reference (WINWORD.DEV.HXS)

    2. Make sure to close any open Office 2010 Beta applications.

    3. Copy the extracted HxS file(s) into the directory where Office 2010 Beta installed them. For a computer running 32-bit Windows, typically the location is:


      C:\Program Files\Microsoft Office\Office14\1033

      For a computer running 32-bit Office on 64-bit Windows, typically the location is

      C:\Program Files (x86)\Microsoft Office\Office14\1033

      You should overwrite the existing versions of the files.

    Viewing the Updated Help

    Start the application for which you have updated the developer help file. Press F1 to open the client help viewer.

    Make sure that you are viewing the local copy of help by ensuring that Developer Reference under Content from This Computer is selected for your client help viewer (shown below). You can now view the help you downloaded using the client help viewer.

    image

    Tip: Make sure you display the Tablet of Contents by clicking the little book icon in the toolbar of the client help viewer. It makes browsing the developer help much more intuitive.

    A Final Note

    In addition to the developer help, you can find dozens of articles, code samples, videos, and more showing you how to work with the awesome developer features in Office 2010 Beta on the Office Developer Center.

Page 1 of 1 (4 items)