If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Merge Word Bookmarks
I am merging an Access Form to a Word document using this code (in part).
.ActiveDocument.Bookmarks("Bonus").Select .Selection.Text = (CCur(Forms!MLOG!Bonus)) I am unable to get the figures in the Word document to look like the ones on the Form. I've used CCur as well as CStr and the Form shows $1,500.00, but Word shows simply 1500. I used Currency for the Table and Form Properties. This part of the Form is a result of multiplying two entries. Another place that I chose 3 decimals for a quotient shows anywhere from none (for ans. of 1) to 15 decimal points (for say 1/3). H*E*L*P! Scafidel Lafayette, LA |
#2
|
|||
|
|||
Merge Word Bookmarks
Hi Scafidel,
In your word document go the the specific field where the currency data is filled. Now press ALT-F9 this will toggle the field codes belonging to the fields. You should see something like: {YourFieldname \* Mergeformat} Change this to: {Yourfieldname \# "€ #.##0,00"} Where yourfieldname is the fieldname from the database and the currency format should be changed to the appropriate format from your country. I supplied the european format for the euro but if you want te replace it by something other that can be done. A simple trick is to go to Excel, type a number change this to the appropriate currencyformat you like. Go to Format Cells and look under the custom format. There you will see the format you have chosen. Copy this and paste this into the fieldcode from Word. Should do the trick. hth -- Maurice Ausum "Scafidel" wrote: I am merging an Access Form to a Word document using this code (in part). .ActiveDocument.Bookmarks("Bonus").Select .Selection.Text = (CCur(Forms!MLOG!Bonus)) I am unable to get the figures in the Word document to look like the ones on the Form. I've used CCur as well as CStr and the Form shows $1,500.00, but Word shows simply 1500. I used Currency for the Table and Form Properties. This part of the Form is a result of multiplying two entries. Another place that I chose 3 decimals for a quotient shows anywhere from none (for ans. of 1) to 15 decimal points (for say 1/3). H*E*L*P! Scafidel Lafayette, LA |
#3
|
|||
|
|||
Merge Word Bookmarks
On Oct 2, 4:45 pm, Maurice wrote:
Hi Scafidel, In your word document go the the specific field where the currency data is filled. Now press ALT-F9 this will toggle the field codes belonging to the fields. You should see something like: {YourFieldname \* Mergeformat} Change this to: {Yourfieldname \# "€ #.##0,00"} I don't see Scafidel using fieldcodes. He/She is selecting on a Word bookmark and replacing the Word bookmark with data. Scafidel - instead of using Cstr or Ccur use Format() - look up the format character placeholders in Help.... HTH Ananda |
#4
|
|||
|
|||
Merge Word Bookmarks
Unfortunately I am using Bookmarks instead of the usual Fields and ALT-F9
doesn't seem to do anything. "Maurice" wrote: Hi Scafidel, In your word document go the the specific field where the currency data is filled. Now press ALT-F9 this will toggle the field codes belonging to the fields. You should see something like: {YourFieldname \* Mergeformat} Change this to: {Yourfieldname \# "€ #.##0,00"} Where yourfieldname is the fieldname from the database and the currency format should be changed to the appropriate format from your country. I supplied the european format for the euro but if you want te replace it by something other that can be done. A simple trick is to go to Excel, type a number change this to the appropriate currencyformat you like. Go to Format Cells and look under the custom format. There you will see the format you have chosen. Copy this and paste this into the fieldcode from Word. Should do the trick. hth -- Maurice Ausum "Scafidel" wrote: I am merging an Access Form to a Word document using this code (in part). .ActiveDocument.Bookmarks("Bonus").Select .Selection.Text = (CCur(Forms!MLOG!Bonus)) I am unable to get the figures in the Word document to look like the ones on the Form. I've used CCur as well as CStr and the Form shows $1,500.00, but Word shows simply 1500. I used Currency for the Table and Form Properties. This part of the Form is a result of multiplying two entries. Another place that I chose 3 decimals for a quotient shows anywhere from none (for ans. of 1) to 15 decimal points (for say 1/3). H*E*L*P! Scafidel Lafayette, LA |
#5
|
|||
|
|||
Merge Word Bookmarks
Then place the bookmark in a field....
-- Maurice Ausum "Scafidel" wrote: Unfortunately I am using Bookmarks instead of the usual Fields and ALT-F9 doesn't seem to do anything. "Maurice" wrote: Hi Scafidel, In your word document go the the specific field where the currency data is filled. Now press ALT-F9 this will toggle the field codes belonging to the fields. You should see something like: {YourFieldname \* Mergeformat} Change this to: {Yourfieldname \# "€ #.##0,00"} Where yourfieldname is the fieldname from the database and the currency format should be changed to the appropriate format from your country. I supplied the european format for the euro but if you want te replace it by something other that can be done. A simple trick is to go to Excel, type a number change this to the appropriate currencyformat you like. Go to Format Cells and look under the custom format. There you will see the format you have chosen. Copy this and paste this into the fieldcode from Word. Should do the trick. hth -- Maurice Ausum "Scafidel" wrote: I am merging an Access Form to a Word document using this code (in part). .ActiveDocument.Bookmarks("Bonus").Select .Selection.Text = (CCur(Forms!MLOG!Bonus)) I am unable to get the figures in the Word document to look like the ones on the Form. I've used CCur as well as CStr and the Form shows $1,500.00, but Word shows simply 1500. I used Currency for the Table and Form Properties. This part of the Form is a result of multiplying two entries. Another place that I chose 3 decimals for a quotient shows anywhere from none (for ans. of 1) to 15 decimal points (for say 1/3). H*E*L*P! Scafidel Lafayette, LA |
Thread Tools | |
Display Modes | |
|
|