Solved

Access Merged to Word

Posted on 2013-06-06
7
402 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
  • 3
  • 2
  • 2
7 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 250 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 250 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now