Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Bookmark currency field
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 |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Bookmark currency field
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" wrote in message ... 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 |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Bookmark currency field
Hi Doug
If I use Format([AccessData], "£#,###.00") in Access the data still appears in Word as 500. Tom "Doug Robbins - Word MVP" wrote in message ... 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" wrote in message ... 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 |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Bookmark currency field
Then use a currency formatting switch on the merge field
see http://www.gmayor.com/formatting_word_fields.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tom wrote: Hi Doug If I use Format([AccessData], "£#,###.00") in Access the data still appears in Word as 500. Tom "Doug Robbins - Word MVP" wrote in message ... 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" wrote in message ... 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 |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Bookmark currency field
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.Ins ertBerfore 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" wrote in message ... Hi Doug If I use Format([AccessData], "£#,###.00") in Access the data still appears in Word as 500. Tom "Doug Robbins - Word MVP" wrote in message ... 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" wrote in message ... 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 |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Bookmark currency field
On the Word document I am using bookmarks not Merge fields.
How can I use a formating switch on a bookmark? Tom "Graham Mayor" wrote in message ... Then use a currency formatting switch on the merge field see http://www.gmayor.com/formatting_word_fields.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tom wrote: Hi Doug If I use Format([AccessData], "£#,###.00") in Access the data still appears in Word as 500. Tom "Doug Robbins - Word MVP" wrote in message ... 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" wrote in message ... 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 |
#7
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Bookmark currency field
From Access am using:
intAmount = Format(Me![AgreedFee], "£#,###.00") .ActiveDocument.Bookmarks("AgreedFee").Select .Selection.Text = intAmount Tom "Doug Robbins - Word MVP" wrote in message ... 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.Ins ertBerfore 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" wrote in message ... Hi Doug If I use Format([AccessData], "£#,###.00") in Access the data still appears in Word as 500. Tom "Doug Robbins - Word MVP" wrote in message ... 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" wrote in message ... 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 |
#8
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Bookmark currency field
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 My web site www.gmayor.com Word MVP web site http://word.mvps.org Tom wrote: On the Word document I am using bookmarks not Merge fields. How can I use a formating switch on a bookmark? Tom "Graham Mayor" wrote in message ... Then use a currency formatting switch on the merge field see http://www.gmayor.com/formatting_word_fields.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tom wrote: Hi Doug If I use Format([AccessData], "£#,###.00") in Access the data still appears in Word as 500. Tom "Doug Robbins - Word MVP" wrote in message ... 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" wrote in message ... 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 |
#9
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Bookmark currency field
Use
.ActiveDocument.Bookmarks("AgreedFee").Range.Inser tBefore 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/Macros...hBookmarks.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" wrote in message ... From Access am using: intAmount = Format(Me![AgreedFee], "£#,###.00") .ActiveDocument.Bookmarks("AgreedFee").Select .Selection.Text = intAmount Tom "Doug Robbins - Word MVP" wrote in message ... 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.Ins ertBerfore 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" wrote in message ... Hi Doug If I use Format([AccessData], "£#,###.00") in Access the data still appears in Word as 500. Tom "Doug Robbins - Word MVP" wrote in message ... 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" wrote in message ... 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 |
#10
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Bookmark currency field
Thanks
That works a treat! Tom "Doug Robbins - Word MVP" wrote in message ... Use .ActiveDocument.Bookmarks("AgreedFee").Range.Inser tBefore 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/Macros...hBookmarks.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" wrote in message ... From Access am using: intAmount = Format(Me![AgreedFee], "£#,###.00") .ActiveDocument.Bookmarks("AgreedFee").Select .Selection.Text = intAmount Tom "Doug Robbins - Word MVP" wrote in message ... 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.Ins ertBerfore 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" wrote in message ... Hi Doug If I use Format([AccessData], "£#,###.00") in Access the data still appears in Word as 500. Tom "Doug Robbins - Word MVP" wrote in message ... 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" wrote in message ... 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 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Access currency field | Mailmerge | |||
Merge Field Currency Switch Rounding | Mailmerge | |||
Conditional Currency/Text Field Format in Merge | Mailmerge | |||
Includetext field does not display form field bookmark | Microsoft Word Help | |||
How do I format a merge field as Currency or %? | Mailmerge |