Solved

Missing zeros in Word mail merge. Data imported via Office Partner (Delphi)

Posted on 2003-12-11
10
439 Views
Last Modified: 2008-02-01
I'm using Office Partner (www.turbopower.com) to import data to Word for mailmerge. My problem is that leading zeros are not shown. How can I set that the leading zeros are shown. I had the same problem in Excel and formatted the cell to show leading zeros, but how can that be done in Word?

real data: 02200
shown in word: 2200


Regards
  Janne
0
Comment
Question by:olmy
  • 3
  • 3
  • 3
  • +1
10 Comments
 
LVL 37

Assisted Solution

by:Joanne M. Orzech
Joanne M. Orzech earned 62 total points
ID: 9928091
0
 
LVL 22

Accepted Solution

by:
Dreamboat earned 63 total points
ID: 9928861
Hit Alt+F9 in your main document.

Change the zip code field to read like this:

{ MERGEFIELD Zipcode [\# "00000"] }
0
 
LVL 1

Author Comment

by:olmy
ID: 9929172
Thank you. I got same answer from both of you and now I know how to do it manually. Next, I need to know how I can do it in my software, when the mailmerge field is added into word. I send more information about it on monday. Thank you and have a good weekend.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 9929186
If you're using VB, I can help with that.
0
 
LVL 22

Expert Comment

by:Dreamboat
ID: 9929402
Basically, olmy, I think that if you change your data connection method (act like you are going to change to a different data source and choose "select method" checkbox) to DDE, that may resolve the issue.
0
 
LVL 1

Author Comment

by:olmy
ID: 9950133
Thank you for you comments.

Dreamboat: I don't know how to access the "data source" setting. Could you give a little more information about that.

Jorzech: I'm using Delphi with OLE-interface and I'm pretty sure that most important part of that code is almost identical. What I need is the calls that enables me to drive Word in a right way.

Is it possible to turn off the way Word handels numbers? Actually those post-number fields are text fields, but Word twistes them into numercial form and then the leading zeros drop out.

Best regards
  Janne
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 9950234
You need to declare your variables and then Word won't "twistes them into numercial form and then the leading zeros drop out."

Dim YourField as Integer

frmForm.TextBox1.Text.Value = Format(YourField, "####0")

0
 
LVL 22

Expert Comment

by:Dreamboat
ID: 9950376
Janne:

I've already stated how to set the connection method:
(act like you are going to change to a different data source and choose "select method" checkbox)

If you want explicit, I need your version of Word.
0
 
LVL 1

Author Comment

by:olmy
ID: 9951342
Dreamboat: I'm sorry, but I really cant find the thing, what you are telling me. I have Word 2002. Is it a word dialog or a call via OLE-interface?
0
 
LVL 10

Expert Comment

by:daleoran
ID: 10512873
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split: Dreamboat & JOrzech

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Daleoran
EE Cleanup Volunteer
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
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.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

838 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