Solved

How to format a calculated field on an Outlook form

Posted on 2007-03-21
1
494 Views
Last Modified: 2011-01-09
Creating an Outlook form, and in using a formula to calculate a field, I cannot figure out how to apply a format to the field.  Example: I am multiplying a price and a quantity to yield a total cost.  The result is unformatted, so it shows "6" instead of $6.00.  I am using Outlook 2003 on Windows XP Pro.

Thanks
0
Comment
Question by:Damian_Gardner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 18870536
You need to add some code to the form to handle this.  Something like this:

Sub Item_CustomPropertyChange(ByVal Name)
    Dim olkInspector, olkPage
    Set olkInspector = Item.GetInspector
    'Change the page name on the next line as needed
    Set olkPage = olkInspector.ModifiedFormPages("Message")
    'Change the property name on the next two lines as needed
    If Name = "YourPropertyName" Then
        Item.UserProperties("YourPropertyName").Value = FormatNumber(Item.UserProperties("YourPropertyName").Value,2,False,False,True)
    End If
    Set olkPage = Nothing
    Set olkInspector = Nothing
End Sub
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question