OL2000: (CW) Displaying Excel Custom Properties in an Outlook View
ID: Q197905
|
The information in this article applies to:
-
Microsoft Outlook 2000
-
Microsoft Excel 2000
NOTE: These procedures only apply if you have installed Outlook with the
Corporate Workgroup/Other option. This option allows you to use Messaging
Application Programming Interface (MAPI) services. To determine your
installation type, on the Help Menu, click About Microsoft Outlook. In
About Microsoft Outlook, you should see "Corporate" if you have the
Corporate Workgroup installation.
SUMMARY
This article describes how you can use the Microsoft Outlook Message
view of a messaging application programming interface (MAPI) folder to
display a Microsoft Excel worksheet's custom properties.
MORE INFORMATION
The example below allows you to display a list of Excel worksheets in such
a manner that contents of selected cells are also displayed. For example,
in Outlook, your worksheets may be displayed as follows, where Department
and Total are cell ranges within each worksheet:
From Subject Department Total
---- ------- ---------- -----
John Doe Sales.xls Sales 100,000
Jane Doe Expenses.xls Expenses 500
The example below is a four-part process. First, you create an Excel
worksheet that includes named cell ranges. Second, you define the named
cell ranges as custom properties of the worksheet. Third, you create a MAPI
folder in Outlook and copy the Excel worksheet into the MAPI folder.
Fourth, you create user-defined fields in the MAPI folder that match your
Excel worksheet custom properties.
Part 1 - Define Named Cell Ranges in an Excel Worksheet
- In Excel, create a new worksheet as follows and format cell
A2 as text and cells B2:F2 as numbers:
A B C D E F
1 Department Q1 Q2 Q3 Q4 Total
2 Sales 25,000 25,000 25,000 25,000 100,000
- Click to select cell A2.
- On the Insert menu, point to Name, and then click Define to open the
Define Name dialog box.
- Under Names In Workbook, type Department over the word "Sales," click
Add, and then click OK.
- Click to select cell F2. Type =SUM(B2:E2),
and press ENTER.
- Click to select cell F2. On the Insert menu, point to Name, and then
click Define to open the Define Name dialog box.
- Under Names In Workbook, type Total, click Add, and then click OK.
Part 2 - Set Custom Worksheet Properties
- On the File menu, click Properties to open the File Properties dialog
box.
- Click the Custom tab, and click to select the Link To Content check box.
- In the Source list, click Department. In the Name box, type Department,
and then click Add.
- In the Source list, click Total. In the Name box, type Total, click
Add, and then click OK.
- Save the worksheet as Sales.xls in your My Documents folder, and then
close it.
Part 3 - Create a MAPI Folder and Copy the Worksheet
- Start Outlook and on the Outlook Bar, click Other Shortcuts to make it
the active group.
- On the File menu, point to New, and then click Folder to open the
Create New Folder dialog box.
- In the Name box, type Testlink and in
the Folder Contains list, click to select Mail Items. Click OK.
- Click Yes to create a shortcut to this folder in the Outlook Bar. The
shortcut will appear under the group, My Shortcuts.
- In Other Shortcuts, click My Documents, and then find and click to
select the Sales.xls file.
- Drag the Sales.xls file to the Testlink shortcut on the Outlook
Bar in the My Shortcuts group.
Part 4 - Creating User Fields in the MAPI Folder
- Click the Testlink shortcut on the Outlook Bar. The Sales.xls
file is now an item in the Testlink MAPI folder. You should see
Sales.xls in the Messages view of the Testlink folder.
- Right-click on the on a message header, such as From or Subject. Click
Field Chooser on the shortcut menu.
- From the list box at the top of the Field Chooser dialog box, click to
select "User-defined fields in folder."
- Drag the Department and Total fields to the column headers of the
current view to create new columns. You should now see the Department
name and the Total fields with the information from the Excel
Worksheet.
- In the Messages view, double-click Sales.xls to open it in Excel.
- With Sales.xls open, type 50000 in the cell E2.
- On the File menu, click Exit, and when prompted to save changes,
click Yes.
The updated value in the Total field of the Outlook messages view
should read "125,000."
REFERENCES
For more information about creating name ranges, click Microsoft Excel Help
on the Help menu, type "Name cells in a workbook" in the Office Assistant
or the Answer Wizard, and then click Search to view the topic.
For more information about creating Outlook user-defined fields, type
"creating user-defined fields" in the Office Assistant, click Search, and
then click to view "Create a custom field."
Additional query words:
ol2k
Keywords : kbdta IntpOle
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbhowto
|