Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access Merged to Word

Posted on 2013-06-06
7
Medium Priority
?
416 Views
Last Modified: 2013-06-10
We have a ACCESS 97 database that we use to generator documents merging into WORD.  The merge does not work correctly using Office 2007.  We have a field that will show if an amount is add or deductive, but it does not put the dollar sign, commas or cents (.00) where it should.  Attached is the form.  That is the only field that does not work.
0
Comment
Question by:nplanek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 1000 total points
ID: 39226409
You haven't attached anything, but it doesn't matter.

In Office 97, the transfer protocol was DDE which uses settings that the datasource's application uses to display the data.

Somewhere between 97 and 2007, the default method changed to ODBC, which only looks at the underlying data.

There are two workarounds.

Firstly you can select DDE as the transfer method if the option .'Confirm file format conversion on open' is set. This is in the Advanced options part, under 'General', near the end of the page.

Better, you can format the data in the main document, using format switches.

In the main document, use the Alt + F9 toggle to display the field codes instead of the field results, so that
<<MyCurrencyField>>
looks like
{ MERGEFIELD MyCurrencyField }

Then you can type in the numeric picture switch so that it looks like this
{ MERGEFIELD MyCurrencyField   \# $#,##0.00 }

You can restore the normal view of the main document using Alt + F9 again
0
 

Author Comment

by:nplanek
ID: 39226710
I did try modifying the WORD document merge field.  Perhaps I'm putting it in the wrong place.  If you would be so kind as to tell me where to insert it in the following:

{ IF {MERGEFIELD AddDeduct } > 0 "Added to Contract" "Deducted from Contract" }
0
 
LVL 31

Assisted Solution

by:Helen Feddema
Helen Feddema earned 1000 total points
ID: 39226720
I agree with Graham.  Here is a list of handy switches to use for formatting imported data in Word documents (for doc properties, but they can also be used with merge fields):

Raw Data:    11523.75
Formatted Data:    $ 11,523.75
Field Code Switches:    DOCPROPERTY "DollarAmount" \# $###,##0.00
 
Raw Data:    2/2/2001
Formatted Data:    February 2, 2001
Field Code Switches:    DOCPROPERTY "DueDate" \@ "MMMM d, yyyy"
 
Raw Data:    282839898
Formatted Data:    28283-9898
Field Code Switches:    DOCPROPERTY "ZipCode" \# "00000'-'0000"
 
Raw Data:    829887445
Formatted Data:    829-88-7445
Field Code Switches:    DOCPROPERTY "SSN" \# "000'-'00'-'0000"
 
Raw Data: 150250
Formatted Data:    one hundred fifty thousand two hundred fifty and 00/100
Field Code Switches:    DOCPROPERTY "DollarAmount" \* DollarText
 
Raw Data: 150250
Formatted Data:    ONE HUNDRED FIFTY THOUSAND TWO HUNDRED FIFTY AND 00/100
Field Code Switches:    DOCPROPERTY "DollarAmount" \* DollarText \* Upper
 
Raw Data: 150250
Formatted Data:     one hundred fifty thousand two hundred fifty
Field Code Switches:    DOCPROPERTY "EntryAmount" \* CardText
 
Raw Data:  11/13/2005
Formatted Data:      Thirteenth
Field Code Switches:    DOCPROPERTY "StartDate" \@ "d" \* OrdText \*FirstCap  
 
Raw Data: 11/13/2005
Formatted Data:      November
Field Code Switches:    DOCPROPERTY "StartDate" \@ "MMMM"
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 76

Expert Comment

by:GrahamSkan
ID: 39226752
Excellent contribution from Helen. However it didn't anticipate your problem

In a complex field structure, you should ensure that only the outer field is formatted (unless internal comparison depends on it):

{ IF {MERGEFIELD AddDeduct } > 0 "Added to Contract" "Deducted from Contract"  \# $#,##0.00 }
0
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 39226797
Or you could do the calcs in Access, and just export the resulting value.
0
 

Author Comment

by:nplanek
ID: 39226954
Graham....it didn't work.  The formatting is there in ACCESS, but still doesn't merge correctly.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 39227401
I think that we need more details.
Are you still trying to use DDE?  I don't recommend it.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question