?
Solved

Access Merged to Word

Posted on 2013-06-06
7
Medium Priority
?
411 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…
Suggested Courses

764 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