olmy
asked on
Missing zeros in Word mail merge. Data imported via Office Partner (Delphi)
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
real data: 02200
shown in word: 2200
Regards
Janne
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you're using VB, I can help with that.
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.
ASKER
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
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
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.Valu e = Format(YourField, "####0")
Dim YourField as Integer
frmForm.TextBox1.Text.Valu
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.
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.
ASKER
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?
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
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
ASKER