Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2000 Mergefield formatting

Status
Not open for further replies.

Curler

IS-IT--Management
Joined
Oct 27, 2002
Messages
89
Location
CA
I'm pulling several data fields from a .dbf file into a Word 2000 document. These are dollar amounts, dates and character fields. I have one record where a dollar amount of 327.60 shows as 327.6 unformatted so I apply the \#$##0.00 mask. This results in 333.00! I have six similar forms with six input files that don't behave like this. If I use another value than 327.60 it looks right. I have updated to SP-3 for the office programs. Short of revising the .dbf to provide a character field rather than a numeric field can anyone offer a suggestion?
 
Right click on the Merge field that has the currency. Go to properties. There should be a currency option under there to format the outcome of the field.
 
The merge data is being pulled from a property management system that we can read for purposes of generating a document but we aren't free to modify the structures of that system. The formatting problem is inside the Word document and is why I'm using the formatting mask shown previously. Word seems to ignore trailing zeroes to the right of the decimal so 327.60 is shown by word as 327.6 and 327.00 looks like 327 My problem is that 327.60 processed by the mask becomes 333.00. Where did the extra 5.40 come from :-) ? Have I misunderstood your reply?
 
Curler.
Do you hae a copy of the Mail Merge Doc? May be easier to "show".

You shouldn't have to do anything with the Information you are drawing from your db. The Mail Merge Doc has the fields the information get merged in. That Field in the unmerged Document can be formatted by right clicking on it.

I have no clue where the 5.40 would be coming from. Not sure if the mask has anything to do with it, or if there is anything else in the db you are pulling from. I may not be explaining my self correctly, if I am not I apologize.

Here is what you do in theory, I have 97 here at work but the functionality is the same. (I have XP and 2000 and home)

Let's say your the field name for that merge currency field is called "income". (This is on the main Word Doc. Not the data source.) Right click on the "income" field and there should be formatting properties for that field. One of the choices should be currency.

IF this doesn't make sense than please let me know via email. Email me at t_galownia@hotmail.com. IF doc is not confidential forward that to me and I will fix field and . . . if it is confidential I could call you (should you still want or need assistance in this matter).

(Haven't has too much sleep lately so not sure I am making sense. I have been really busy, kinda over did it. :) Almost done though.)
 
Here is a note I pulled from a Microsoft newsgroup. Apparently this is a known problem with formatting a currency field. This fellow had a Foxbase problem while mine was Clipper but the characteristics are the same. As with many Word and Excel issues you need a work around because a correction is unlikely!

Thanks for trying anyway.

Bryan


----- Original Message -----
From: &quot;Cindy Meister -WordMVP-&quot; <CindyMeister@swissonline.ch>
Newsgroups: microsoft.public.word.mailmerge.fields
Sent: Friday, April 11, 2003 11:48 AM
Subject: Re: Foxpro dbf mail merge


> Hi Jay,
>
> This sounds very much like a problem Word 2000 is known to have with
> ODBC drivers and fields in Excel or Access of the data type *currency*.
> I take it you have no option to change the data type in the Foxpro
> database. In Access, we'd use a query with the Format function to export
> the information as a literal string. Would you have any possibility like
> that with Foxpro?
>
> Otherwise, yes, do try the other *.dbf ODBC driver.
>
> You only other options would be to export the Foxpro data to another
> format (delimited text) or import it into Excel or Access and then
> merge.
>
> > I am having a very weird problem with a mailmerge. Using a foxpro
> > database table, where there is numeric data stored, datatype numeric
> > 10,2, when a mergefield has a value to the right of the decimal that
> > ends in a zero, the merge fails. If the field is inserted
> > unformatted, it appears xxx x. If it is inserted using any of the
> > formatting options, it appears xxx+x.00. That is, 282.20 appears as
> > 282 2 unformatted, and 284.00 when formatted. The *dollartext even
> > produces this behavior: &quot;two hundred eighty four and 00/100ths&quot; is the
> > output.
> >
> > The ODBC version is 3.520.4403.2. Word version is Word 2K 9.0.4402
> > SR-1.
> >
> > However, I don't know that Fox is using ODBC to do this. The ODBC
> > database choice doesn't in the source data dropdown, as I expected it
> > to. There are two dbf choices, Fox and dbase.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top