Access to Word using Currency

cstickman

Registered User.
Local time
Today, 05:17
Joined
Nov 10, 2014
Messages
109
Hey guys,

I built a form that exports a table to Word. I am using Bookmarks in the Word Template and one of the fields is Currency. I am having a hard time trying to get the value sent over to word with currency. I have tried the below:

.formfields("Cost").result = Me.txtcourt = Format(CCur(Me.txtcourt), "Currency")

.formfields("Cost").result = Me.txtcourt.value = Format(CCur(Me.txtcourt.value), "Currency")

.formfields("Cost").result = Me.txtcourt.value = Format(TextBox16.Value, "$.00")

.formfields("Cost").result = Me.txtcourt.value = Format(Me.TextBox16.Value, "$#.00")

Any suggestions? I believe the table field is listed as a text field because I do have a module that is converting that to currency with the following code:

Me.txtcourt = CCur(Me.txtcourt)

Any assistance would be greatly appreciated. Thanks!!
 
Hi try below that worked for me doing the same thing.

.formfields("Cost").result = Me.txtcourt.value = Format(Me.TextBox16.Value, "$0.00")
 
I tried - .formfields("Cost").result = Me.txtcourt.Value = Format(Me.txtcourt.Value, "$0.00") and on the Word Document it comes up as False.

The word file has a textbox inserted with the bookmark named Cost if that makes any difference. Any other suggestions?
 
Have you tried in the word document to format the bookmark as number and the format as currency?
Right click and properties.
 
I have Word 2013 and it does not give me an option to change to Currency. It seems to have everything, but that as an option.
 
Sorry Mate, I'm using 2007 and there it worked. I don't know.
 
I got it to work - We were both on the right track, but the layout changed with 2013. So here is the correct way to do it:

.formfields("Cost").result = Format(Me.txtcourt, "$##.00")

Then you just add to it depending on the currency for example

$1,000.00 would be "$#,###.00"
$100,000.00 would be "$###,###.00"

and so on. Thanks for your help though!!
 

Users who are viewing this thread

Back
Top Bottom