Bookmark currency field

T

Tom

Hi hope this is the right place for this question.

Am using Access & Word 2002 and using Officice Automation to pass Access
data to a Word document.

Where I am having a problem is from Access I am bring over a currency field
e.g. £500.00 but in the bookmarked field in Word it shows as 500.

How can I get it to show as £500.00 in Word.

TIA

Tom
 
D

Doug Robbins - Word MVP

Use Format([AccessData], "£#,###.00")

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
T

Tom

Hi Doug

If I use Format([AccessData], "£#,###.00") in Access the data still appears
in Word as 500.

Tom
Doug Robbins - Word MVP said:
Use Format([AccessData], "£#,###.00")

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tom said:
Hi hope this is the right place for this question.

Am using Access & Word 2002 and using Officice Automation to pass Access
data to a Word document.

Where I am having a problem is from Access I am bring over a currency
field e.g. £500.00 but in the bookmarked field in Word it shows as 500.

How can I get it to show as £500.00 in Word.

TIA

Tom
 
G

Graham Mayor

Then use a currency formatting switch on the merge field
see http://www.gmayor.com/formatting_word_fields.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Hi Doug

If I use Format([AccessData], "£#,###.00") in Access the data still
appears in Word as 500.

Tom
Doug Robbins - Word MVP said:
Use Format([AccessData], "£#,###.00")

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tom said:
Hi hope this is the right place for this question.

Am using Access & Word 2002 and using Officice Automation to pass
Access data to a Word document.

Where I am having a problem is from Access I am bring over a
currency field e.g. £500.00 but in the bookmarked field in Word it
shows as 500. How can I get it to show as £500.00 in Word.

TIA

Tom
 
D

Doug Robbins - Word MVP

How are you inserting the information into the bookmark?

If you use Format() in a query in Access, it will convert the numeric value
of 500 to a string of £500.00

If you use code like the following to insert some Access data into a Word
document.

documentobject.Bookmarks("somebookmark").Range.InsertBerfore
Format([AccessData], "£#,###.00")

you would get £500.00 inserted into the .Range of the bookmark.

If you are using mail merge to insert the data into Word (in which case the
reference to a bookmarked field is not relevant, you would add a

\# "£,#.00"

formatting switch to the mergefield code.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tom said:
Hi Doug

If I use Format([AccessData], "£#,###.00") in Access the data still
appears in Word as 500.

Tom
Doug Robbins - Word MVP said:
Use Format([AccessData], "£#,###.00")

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tom said:
Hi hope this is the right place for this question.

Am using Access & Word 2002 and using Officice Automation to pass Access
data to a Word document.

Where I am having a problem is from Access I am bring over a currency
field e.g. £500.00 but in the bookmarked field in Word it shows as 500.

How can I get it to show as £500.00 in Word.

TIA

Tom
 
T

Tom

On the Word document I am using bookmarks not Merge fields.

How can I use a formating switch on a bookmark?

Tom

Graham Mayor said:
Then use a currency formatting switch on the merge field
see http://www.gmayor.com/formatting_word_fields.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Hi Doug

If I use Format([AccessData], "£#,###.00") in Access the data still
appears in Word as 500.

Tom
Doug Robbins - Word MVP said:
Use Format([AccessData], "£#,###.00")

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Hi hope this is the right place for this question.

Am using Access & Word 2002 and using Officice Automation to pass
Access data to a Word document.

Where I am having a problem is from Access I am bring over a
currency field e.g. £500.00 but in the bookmarked field in Word it
shows as 500. How can I get it to show as £500.00 in Word.

TIA

Tom
 
T

Tom

From Access am using:

intAmount = Format(Me![AgreedFee], "£#,###.00")

.ActiveDocument.Bookmarks("AgreedFee").Select
.Selection.Text = intAmount

Tom

Doug Robbins - Word MVP said:
How are you inserting the information into the bookmark?

If you use Format() in a query in Access, it will convert the numeric
value of 500 to a string of £500.00

If you use code like the following to insert some Access data into a Word
document.

documentobject.Bookmarks("somebookmark").Range.InsertBerfore
Format([AccessData], "£#,###.00")

you would get £500.00 inserted into the .Range of the bookmark.

If you are using mail merge to insert the data into Word (in which case
the reference to a bookmarked field is not relevant, you would add a

\# "£,#.00"

formatting switch to the mergefield code.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tom said:
Hi Doug

If I use Format([AccessData], "£#,###.00") in Access the data still
appears in Word as 500.

Tom
Doug Robbins - Word MVP said:
Use Format([AccessData], "£#,###.00")

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Hi hope this is the right place for this question.

Am using Access & Word 2002 and using Officice Automation to pass
Access data to a Word document.

Where I am having a problem is from Access I am bring over a currency
field e.g. £500.00 but in the bookmarked field in Word it shows as 500.

How can I get it to show as £500.00 in Word.

TIA

Tom
 
G

Graham Mayor

Looking at the example in Doug's branch of the thread, something of the
order of

Dim rAmount As Range
Set rAmount = ActiveDocument.Bookmarks("AgreedAmount").Range
rAmount.Text = Format(intAmount, "£#,###.00")
ActiveDocument.Bookmarks.Add "AgreedAmount", rAmount

but I concede I don't know a lot about the Word object library when used
from Access.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


On the Word document I am using bookmarks not Merge fields.

How can I use a formating switch on a bookmark?

Tom

Graham Mayor said:
Then use a currency formatting switch on the merge field
see http://www.gmayor.com/formatting_word_fields.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Hi Doug

If I use Format([AccessData], "£#,###.00") in Access the data still
appears in Word as 500.

Tom
Use Format([AccessData], "£#,###.00")

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of
my services on a paid consulting basis.

Doug Robbins - Word MVP

Hi hope this is the right place for this question.

Am using Access & Word 2002 and using Officice Automation to pass
Access data to a Word document.

Where I am having a problem is from Access I am bring over a
currency field e.g. £500.00 but in the bookmarked field in Word it
shows as 500. How can I get it to show as £500.00 in Word.

TIA

Tom
 
D

Doug Robbins - Word MVP

Use

.ActiveDocument.Bookmarks("AgreedFee").Range.InsertBefore
Format(Me![AgreedFee], "£#,###.00")

Your code will run much quicker if you use the .Range object rather than the
..Selection object of you have the code Select bookmarks and then set the
..Text property of the bookmark.

See the article "Working with Bookmarks in VBA" at:

http://www.word.mvps.org/FAQs/MacrosVBA/WorkWithBookmarks.htm


--
Hope this helps.


Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tom said:
From Access am using:

intAmount = Format(Me![AgreedFee], "£#,###.00")

.ActiveDocument.Bookmarks("AgreedFee").Select
.Selection.Text = intAmount

Tom

Doug Robbins - Word MVP said:
How are you inserting the information into the bookmark?

If you use Format() in a query in Access, it will convert the numeric
value of 500 to a string of £500.00

If you use code like the following to insert some Access data into a Word
document.

documentobject.Bookmarks("somebookmark").Range.InsertBerfore
Format([AccessData], "£#,###.00")

you would get £500.00 inserted into the .Range of the bookmark.

If you are using mail merge to insert the data into Word (in which case
the reference to a bookmarked field is not relevant, you would add a

\# "£,#.00"

formatting switch to the mergefield code.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tom said:
Hi Doug

If I use Format([AccessData], "£#,###.00") in Access the data still
appears in Word as 500.

Tom
Use Format([AccessData], "£#,###.00")

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Hi hope this is the right place for this question.

Am using Access & Word 2002 and using Officice Automation to pass
Access data to a Word document.

Where I am having a problem is from Access I am bring over a currency
field e.g. £500.00 but in the bookmarked field in Word it shows as
500.

How can I get it to show as £500.00 in Word.

TIA

Tom
 
T

Tom

Thanks

That works a treat!

Tom
Doug Robbins - Word MVP said:
Use

.ActiveDocument.Bookmarks("AgreedFee").Range.InsertBefore
Format(Me![AgreedFee], "£#,###.00")

Your code will run much quicker if you use the .Range object rather than
the .Selection object of you have the code Select bookmarks and then set
the .Text property of the bookmark.

See the article "Working with Bookmarks in VBA" at:

http://www.word.mvps.org/FAQs/MacrosVBA/WorkWithBookmarks.htm


--
Hope this helps.


Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tom said:
From Access am using:

intAmount = Format(Me![AgreedFee], "£#,###.00")

.ActiveDocument.Bookmarks("AgreedFee").Select
.Selection.Text = intAmount

Tom

Doug Robbins - Word MVP said:
How are you inserting the information into the bookmark?

If you use Format() in a query in Access, it will convert the numeric
value of 500 to a string of £500.00

If you use code like the following to insert some Access data into a
Word document.

documentobject.Bookmarks("somebookmark").Range.InsertBerfore
Format([AccessData], "£#,###.00")

you would get £500.00 inserted into the .Range of the bookmark.

If you are using mail merge to insert the data into Word (in which case
the reference to a bookmarked field is not relevant, you would add a

\# "£,#.00"

formatting switch to the mergefield code.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Hi Doug

If I use Format([AccessData], "£#,###.00") in Access the data still
appears in Word as 500.

Tom
Use Format([AccessData], "£#,###.00")

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Hi hope this is the right place for this question.

Am using Access & Word 2002 and using Officice Automation to pass
Access data to a Word document.

Where I am having a problem is from Access I am bring over a currency
field e.g. £500.00 but in the bookmarked field in Word it shows as
500.

How can I get it to show as £500.00 in Word.

TIA

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top