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
Solved

Access Merged to Word

Posted on 2013-06-06
7
405 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

860 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