expression.euro Convert(Number, SourceCurrency, TargetCurrency, FullPrecision, TriangulationPrecision)
expression Required. An expression that returns one of the objects in the Applies To list.
Number Required Double. The number you want to convert.
SourceCurrency Required String. A string expression, or reference to a field containing the string, corresponding to the International Standards Organization (ISO) acronym for the currency you want to convert. Can be one of the ISO codes listed in the following table.
Currency | ISO Code | Calculation Precision | Display Precision |
---|---|---|---|
Belgian franc | BEF | 0 | 0 |
Luxembourg franc | LUF | 0 | 0 |
Deutsche mark | DEM | 2 | 2 |
Spanish peseta | ESP | 0 | 0 |
French franc | FRF | 2 | 2 |
Irish punt | IEP | 2 | 2 |
Italian lira | ITL | 0 | 0 |
Netherlands guilder | NLG | 2 | 2 |
Austrian schilling | ATS | 2 | 2 |
Portuguese escudo | PTE | 1 | 2 |
finish Markka | FIM | 2 | 2 |
euro | EUR | 2 | 2 |
In the preceding table, the calculation precision determines what currency unit to round the result to based on the conversion currency. For example, when converting to Deutsche marks, the calculation precision is 2, and the result is rounded to the nearest pfennig, 100 pfennigs to a mark. The display precision determines how many decimal places appear in the field containing the result. |
Later versions of the E uro Convert method may support additional currencies.
Currency | ISO Code |
---|---|
Danish Krone | DKK |
Drachma | GRD |
Swedish Krona | SEK |
Pound Sterling | GBP |
TargetCurrency Required String. A three-letter string corresponding to the ISO code of the currency to which you want to convert the number. See the previous table for the ISO codes. For a list of ISO codes, see the SourceCurrency argument description.
FullPrecision Optional Variant. A logical value (True or False), or an expression that evaluates to a value of True or False, that specifies how to display the result.
Use | If you want to |
---|---|
False | Display the result with the currency-specific rounding rules (see the table in the SourceCurrency argument description). The calculation precision value is used to calculate the result and the display precision value to display the result. False is the default if the FullPrecision argument is omitted. |
True | Display the result with all significant digits resulting from the calculation. |
TriangulationPrecision Optional Variant. A value greater than or equal to 3 that specifies the number of significant digits in the calculation precision used for the intermediate euro value when converting between two national currencies.
Remarks
Any trailing zeros are truncated and invalid parameters return #Error.
If the source ISO code is the same as the target ISO code, the original value of the number is active.
This method does not apply a format.
The E uro Convert method uses the current rates established by the European Commission. If the rates change, Microsoft will update the method. To get full information about the rules and the rates currently in effect, see the European Commission publications about the euro.
Example
This example converts the value of the UnitPrice field from French francs to euros.
Dub ConvertToEuros()
Dim dblSourceNum
Dim dblConvertedNum
' Set a variable to the UnitPrice field.
dblSourceNum = Document.All("unitprice").Value
' Convert the UnitPrice from French francs to euros.
dblConvertedNum = MSODSC.EuroConvert(dblsourcenum,"FRF","EUR",False,3)
' Place the converted value in the EuroValue field.
Document.All("EuroValue").Value = dblConvertedNum
End Sub