A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Merge Word Bookmarks



 
 
Thread Tools Display Modes
  #1  
Old October 2nd, 2007, 06:25 AM posted to microsoft.public.access
Scafidel
external usenet poster
 
Posts: 35
Default 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  
Old October 2nd, 2007, 07:45 AM posted to microsoft.public.access
Maurice
external usenet poster
 
Posts: 1,585
Default 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  
Old October 2nd, 2007, 11:30 AM posted to microsoft.public.access
AnandaSim
external usenet poster
 
Posts: 98
Default 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  
Old October 2nd, 2007, 03:24 PM posted to microsoft.public.access
Scafidel
external usenet poster
 
Posts: 35
Default 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  
Old October 2nd, 2007, 05:03 PM posted to microsoft.public.access
Maurice
external usenet poster
 
Posts: 1,585
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.