Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / November 2004

Tip: Looking for answers? Try searching our database.

Customizing A Number Format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob - 08 Aug 2004 12:27 GMT
I am merging a case number into Word 2000 that is initially in the following
format: ##-#####.  I have been trying to figure out how I can format it in
the merge process to the following: ##-bk-#####.  Basically, I need to insert
"bk-" after the first dash between the two number groups.  I tried to adapt
the serial number example on Graham Mayor's website, but I just don't have
enough known-how to figure this out, if it can be done.
Graham Mayor - 08 Aug 2004 12:45 GMT
If we are looking at a seven digit number, then
\# "00-bk-00000"
or
\# "##-bk-#####"
will work

However, I suspect this isn't a number, but text, and you can't format text
with
number switches. You would have to derive the numbers in the data file
first. This would be simple enough in an Excel file.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I am merging a case number into Word 2000 that is initially in the
> following format: ##-#####.  I have been trying to figure out how I
[quoted text clipped - 3 lines]
> Graham Mayor's website, but I just don't have enough known-how to
> figure this out, if it can be done.
Bob - 08 Aug 2004 20:49 GMT
Graham - Is it possible to "extract" the first two numbers and to thereafter
do the same with the five-number string at the end?  If I can do that, then I
could easily put the "-bk-" into the merge form.  Thanks.

> If we are looking at a seven digit number, then
>  \# "00-bk-00000"
[quoted text clipped - 14 lines]
> > Graham Mayor's website, but I just don't have enough known-how to
> > figure this out, if it can be done.
Doug Robbins - 09 Aug 2004 00:39 GMT
You will have to do the manipulation in the data source.  Alternatively,
after executing the mailmerge to a new document, do a Wildcard replace in
which you search for

([0-9]{2})-([0-9]{5})

and in the replace control you insert

\1-bk-\2

For an explanation of the above, see the article "Finding and replacing
characters using wildcards" at:

http://word.mvps.org/FAQs/General/UsingWildcards.htm

Signature

Please respond to the Newsgroup for the benefit of others who may be
interested.   Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP

> Graham - Is it possible to "extract" the first two numbers and to
> thereafter
[quoted text clipped - 21 lines]
>> > Graham Mayor's website, but I just don't have enough known-how to
>> > figure this out, if it can be done.
Sharon - 02 Nov 2004 21:14 GMT
Does this mean that you cannot format a field that contains both text and
numbers?  For instance, I am trying to format a field for a FED EX number,
e.g., EV ### ### ### US.  I have tried your website, but nothing really
addresses this that I can find.  

> If we are looking at a seven digit number, then
>  \# "00-bk-00000"
[quoted text clipped - 14 lines]
> > Graham Mayor's website, but I just don't have enough known-how to
> > figure this out, if it can be done.
Doug Robbins - 03 Nov 2004 01:06 GMT
Yes.  You would need to split the data into the numeric part and the alpha
part.

Signature

Please respond to the Newsgroup for the benefit of others who may be
interested.   Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP

> Does this mean that you cannot format a field that contains both text and
> numbers?  For instance, I am trying to format a field for a FED EX number,
[quoted text clipped - 20 lines]
>> > Graham Mayor's website, but I just don't have enough known-how to
>> > figure this out, if it can be done.
Sharon - 09 Nov 2004 13:23 GMT
So, you are saying you can't have 1 field with numbers and alpha characters?  
Or are you saying you have to split the switch using numeric and alpha
characters?  I have tried various ways to do the switch with both alpha and
numeric, but am unsuccessful.  That doesn't mean much though because I don't
know what I am doing anyway!!

> Yes.  You would need to split the data into the numeric part and the alpha
> part.
[quoted text clipped - 23 lines]
> >> > Graham Mayor's website, but I just don't have enough known-how to
> >> > figure this out, if it can be done.
Graham Mayor - 09 Nov 2004 13:59 GMT
What we are saying is that you cannot use a number formatting switch on a
data field that contains both text and numbers. Such a field is text and
does not normally require a switch. However, in those circumstances where it
does, you need to split the data into its text and number portions to
produce separate fields text and number fields which can be combined.

In the case of your FED-EX 'numbers', if the always begin with EV and always
end in US, you don't need that part of the 'number' in your data. In the
case of a data field containing nine numerals (123456789), you can format to
produce the finished the 'number' as
EV{Mergefield FEDEX \# "### ### ###"}US
or
{Mergefield FEDEX  \# "EV### ### ###US"}
both of which will produce
EV123 456 789US

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> So, you are saying you can't have 1 field with numbers and alpha
> characters? Or are you saying you have to split the switch using
[quoted text clipped - 45 lines]
>>>>> Graham Mayor's website, but I just don't have enough known-how to
>>>>> figure this out, if it can be done.
Sharon - 09 Nov 2004 14:24 GMT
I tried to only put the middle numbers into the Access database from where I
am getting this data, and then in the Word form had EV \# "###' '###' '###"
US, but then low and behold, instead of EV, it was EL.  I was trying to look
toward the future letters/numbers in formatting it with switches in the Word
form.  If it can't be done or is too difficult, I may just go back to leaving
them all in one long number and leave it at that.  Thanks.

> What we are saying is that you cannot use a number formatting switch on a
> data field that contains both text and numbers. Such a field is text and
[quoted text clipped - 61 lines]
> >>>>> Graham Mayor's website, but I just don't have enough known-how to
> >>>>> figure this out, if it can be done.
Graham Mayor - 09 Nov 2004 15:33 GMT
Could you not simply add another field to the Access database to carry the
prefix?

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I tried to only put the middle numbers into the Access database from
> where I am getting this data, and then in the Word form had EV \#
[quoted text clipped - 81 lines]
>>>>>>> on Graham Mayor's website, but I just don't have enough
>>>>>>> known-how to figure this out, if it can be done.
Sharon - 09 Nov 2004 16:18 GMT
That's what I will do!!!  Thanks.

> Could you not simply add another field to the Access database to carry the
> prefix?
[quoted text clipped - 84 lines]
> >>>>>>> on Graham Mayor's website, but I just don't have enough
> >>>>>>> known-how to figure this out, if it can be done.
Sharon - 09 Nov 2004 13:26 GMT
Are you saying that you can't have field with alpha and numeric characters?  
Or, are you saying you need to have the switch split into alpha and numeric
characters?  I have tried various ways to have the switch do the first two
characters as alpha; the middle characters as numeric and the last two
characters as alpha, but am having no luck at all.  

> Yes.  You would need to split the data into the numeric part and the alpha
> part.
[quoted text clipped - 23 lines]
> >> > Graham Mayor's website, but I just don't have enough known-how to
> >> > figure this out, if it can be done.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.