Solved

Access Merged to Word

Posted on 2013-06-06
7
409 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 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

705 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