Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I have an Access 2003 database where some of the number fields are in
scientific format. In Word 2003 when I insert the scientific formatted fields, they appear in decimal format. How can I handle this formatting problem? |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
The following was posted by fellow MVP Macropod:
Quote The following compound field will return the scientific notation of any +ve value between 10^-9 and 10^9: {QUOTE {SET a {SourceVal}} {SET b{=9-(a10^9)-(a10^8)-(a10^7)-(a10^6)-(a10^5)-(a10^4)-(a10^3)-(a10^2) -(a10^1)-(a10^0)-(a10^-1)-(a10^-2)-(a10^-3)-(a10^-4)-(a10^-5)-(a10^- 6)-(a10^-7)-(a10^-8)}} {SET c{=int(a/10^b)+mod(a,10^b)/10^b}} {c \# 0.00}E{b \# +00;-00}} where 'SourceVal' is the input, which could be a formula taking its input from two formfields. You can extend the range easily enough by adding more terms. All the field braces (i.e. { }) are created in pairs via Ctrl-F9. I've laid the coding out with line breaks to separate the key portions of the coding, but you don't really need them. Unquote I am not sure if this will work with mailmerge, but I think that the thing to do would be to replace {SourceVal} with your Merge Field that contains the value. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message ... I have an Access 2003 database where some of the number fields are in scientific format. In Word 2003 when I insert the scientific formatted fields, they appear in decimal format. How can I handle this formatting problem? |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Thank you for the response. I will try it.
In a QBE form do I set up an expression and enter this code after the colon? "Doug Robbins - Word MVP" wrote: The following was posted by fellow MVP Macropod: Quote The following compound field will return the scientific notation of any +ve value between 10^-9 and 10^9: {QUOTE {SET a {SourceVal}} {SET b{=9-(a10^9)-(a10^8)-(a10^7)-(a10^6)-(a10^5)-(a10^4)-(a10^3)-(a10^2) -(a10^1)-(a10^0)-(a10^-1)-(a10^-2)-(a10^-3)-(a10^-4)-(a10^-5)-(a10^- 6)-(a10^-7)-(a10^-8)}} {SET c{=int(a/10^b)+mod(a,10^b)/10^b}} {c \# 0.00}E{b \# +00;-00}} where 'SourceVal' is the input, which could be a formula taking its input from two formfields. You can extend the range easily enough by adding more terms. All the field braces (i.e. { }) are created in pairs via Ctrl-F9. I've laid the coding out with line breaks to separate the key portions of the coding, but you don't really need them. Unquote I am not sure if this will work with mailmerge, but I think that the thing to do would be to replace {SourceVal} with your Merge Field that contains the value. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message ... I have an Access 2003 database where some of the number fields are in scientific format. In Word 2003 when I insert the scientific formatted fields, they appear in decimal format. How can I handle this formatting problem? |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Dear Doug:
In an Access QBE form I set up an Expression: followed by the {QUOTE......}} below. I got an error message saying: Replication ID is invalid. Replication ID must contain digits, letters, or hexadecimal numbers and must of the right length and be in canonicalSQL form. I have no idea what any ot that means, except perhaps using {, (, #, etc. characters might be a problem. Do you have any further suggestions? Thank you. Steve Barker ------------------------ "Doug Robbins - Word MVP" wrote: The following was posted by fellow MVP Macropod: Quote The following compound field will return the scientific notation of any +ve value between 10^-9 and 10^9: {QUOTE {SET a {SourceVal}} {SET b{=9-(a10^9)-(a10^8)-(a10^7)-(a10^6)-(a10^5)-(a10^4)-(a10^3)-(a10^2) -(a10^1)-(a10^0)-(a10^-1)-(a10^-2)-(a10^-3)-(a10^-4)-(a10^-5)-(a10^- 6)-(a10^-7)-(a10^-8)}} {SET c{=int(a/10^b)+mod(a,10^b)/10^b}} {c \# 0.00}E{b \# +00;-00}} where 'SourceVal' is the input, which could be a formula taking its input from two formfields. You can extend the range easily enough by adding more terms. All the field braces (i.e. { }) are created in pairs via Ctrl-F9. I've laid the coding out with line breaks to separate the key portions of the coding, but you don't really need them. Unquote I am not sure if this will work with mailmerge, but I think that the thing to do would be to replace {SourceVal} with your Merge Field that contains the value. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message ... I have an Access 2003 database where some of the number fields are in scientific format. In Word 2003 when I insert the scientific formatted fields, they appear in decimal format. How can I handle this formatting problem? |
#5
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
In your duplicate thread in another forum (please don't multipost!) I
replied - From the Tools menu in Word, select Options and then go to the General tab and check the box against the "Confirm conversions at open" item. Then when you attach the data source to the mail merge main document, you will be given the option of using the DDE method of connection which should read the data as you have it formatted in the table. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org GCNY wrote: Dear Doug: In an Access QBE form I set up an Expression: followed by the {QUOTE......}} below. I got an error message saying: Replication ID is invalid. Replication ID must contain digits, letters, or hexadecimal numbers and must of the right length and be in canonicalSQL form. I have no idea what any ot that means, except perhaps using {, (, #, etc. characters might be a problem. Do you have any further suggestions? Thank you. Steve Barker ------------------------ "Doug Robbins - Word MVP" wrote: The following was posted by fellow MVP Macropod: Quote The following compound field will return the scientific notation of any +ve value between 10^-9 and 10^9: {QUOTE {SET a {SourceVal}} {SET b{=9-(a10^9)-(a10^8)-(a10^7)-(a10^6)-(a10^5)-(a10^4)-(a10^3)-(a10^2) -(a10^1)-(a10^0)-(a10^-1)-(a10^-2)-(a10^-3)-(a10^-4)-(a10^-5)-(a10^- 6)-(a10^-7)-(a10^-8)}} {SET c{=int(a/10^b)+mod(a,10^b)/10^b}} {c \# 0.00}E{b \# +00;-00}} where 'SourceVal' is the input, which could be a formula taking its input from two formfields. You can extend the range easily enough by adding more terms. All the field braces (i.e. { }) are created in pairs via Ctrl-F9. I've laid the coding out with line breaks to separate the key portions of the coding, but you don't really need them. Unquote I am not sure if this will work with mailmerge, but I think that the thing to do would be to replace {SourceVal} with your Merge Field that contains the value. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message ... I have an Access 2003 database where some of the number fields are in scientific format. In Word 2003 when I insert the scientific formatted fields, they appear in decimal format. How can I handle this formatting problem? |
#6
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
No, you would put the expression in the mail merge main document.
-- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message news ![]() Thank you for the response. I will try it. In a QBE form do I set up an expression and enter this code after the colon? "Doug Robbins - Word MVP" wrote: The following was posted by fellow MVP Macropod: Quote The following compound field will return the scientific notation of any +ve value between 10^-9 and 10^9: {QUOTE {SET a {SourceVal}} {SET b{=9-(a10^9)-(a10^8)-(a10^7)-(a10^6)-(a10^5)-(a10^4)-(a10^3)-(a10^2) -(a10^1)-(a10^0)-(a10^-1)-(a10^-2)-(a10^-3)-(a10^-4)-(a10^-5)-(a10^- 6)-(a10^-7)-(a10^-8)}} {SET c{=int(a/10^b)+mod(a,10^b)/10^b}} {c \# 0.00}E{b \# +00;-00}} where 'SourceVal' is the input, which could be a formula taking its input from two formfields. You can extend the range easily enough by adding more terms. All the field braces (i.e. { }) are created in pairs via Ctrl-F9. I've laid the coding out with line breaks to separate the key portions of the coding, but you don't really need them. Unquote I am not sure if this will work with mailmerge, but I think that the thing to do would be to replace {SourceVal} with your Merge Field that contains the value. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message ... I have an Access 2003 database where some of the number fields are in scientific format. In Word 2003 when I insert the scientific formatted fields, they appear in decimal format. How can I handle this formatting problem? |
#7
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Excuse me for multiposting; but this problem involves both Word & Access. I
don't know where the answer will come from. The Tools/Options/General/Confirm conversions at open was checked. So that is not the solution. "Graham Mayor" wrote: In your duplicate thread in another forum (please don't multipost!) I replied - From the Tools menu in Word, select Options and then go to the General tab and check the box against the "Confirm conversions at open" item. Then when you attach the data source to the mail merge main document, you will be given the option of using the DDE method of connection which should read the data as you have it formatted in the table. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org GCNY wrote: Dear Doug: In an Access QBE form I set up an Expression: followed by the {QUOTE......}} below. I got an error message saying: Replication ID is invalid. Replication ID must contain digits, letters, or hexadecimal numbers and must of the right length and be in canonicalSQL form. I have no idea what any ot that means, except perhaps using {, (, #, etc. characters might be a problem. Do you have any further suggestions? Thank you. Steve Barker ------------------------ "Doug Robbins - Word MVP" wrote: The following was posted by fellow MVP Macropod: Quote The following compound field will return the scientific notation of any +ve value between 10^-9 and 10^9: {QUOTE {SET a {SourceVal}} {SET b{=9-(a10^9)-(a10^8)-(a10^7)-(a10^6)-(a10^5)-(a10^4)-(a10^3)-(a10^2) -(a10^1)-(a10^0)-(a10^-1)-(a10^-2)-(a10^-3)-(a10^-4)-(a10^-5)-(a10^- 6)-(a10^-7)-(a10^-8)}} {SET c{=int(a/10^b)+mod(a,10^b)/10^b}} {c \# 0.00}E{b \# +00;-00}} where 'SourceVal' is the input, which could be a formula taking its input from two formfields. You can extend the range easily enough by adding more terms. All the field braces (i.e. { }) are created in pairs via Ctrl-F9. I've laid the coding out with line breaks to separate the key portions of the coding, but you don't really need them. Unquote I am not sure if this will work with mailmerge, but I think that the thing to do would be to replace {SourceVal} with your Merge Field that contains the value. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message ... I have an Access 2003 database where some of the number fields are in scientific format. In Word 2003 when I insert the scientific formatted fields, they appear in decimal format. How can I handle this formatting problem? |
#8
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Where? As a macro for each of the 8 Scientific format merge fileds or just
once? "Doug Robbins - Word MVP" wrote: No, you would put the expression in the mail merge main document. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message news ![]() Thank you for the response. I will try it. In a QBE form do I set up an expression and enter this code after the colon? "Doug Robbins - Word MVP" wrote: The following was posted by fellow MVP Macropod: Quote The following compound field will return the scientific notation of any +ve value between 10^-9 and 10^9: {QUOTE {SET a {SourceVal}} {SET b{=9-(a10^9)-(a10^8)-(a10^7)-(a10^6)-(a10^5)-(a10^4)-(a10^3)-(a10^2) -(a10^1)-(a10^0)-(a10^-1)-(a10^-2)-(a10^-3)-(a10^-4)-(a10^-5)-(a10^- 6)-(a10^-7)-(a10^-8)}} {SET c{=int(a/10^b)+mod(a,10^b)/10^b}} {c \# 0.00}E{b \# +00;-00}} where 'SourceVal' is the input, which could be a formula taking its input from two formfields. You can extend the range easily enough by adding more terms. All the field braces (i.e. { }) are created in pairs via Ctrl-F9. I've laid the coding out with line breaks to separate the key portions of the coding, but you don't really need them. Unquote I am not sure if this will work with mailmerge, but I think that the thing to do would be to replace {SourceVal} with your Merge Field that contains the value. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message ... I have an Access 2003 database where some of the number fields are in scientific format. In Word 2003 when I insert the scientific formatted fields, they appear in decimal format. How can I handle this formatting problem? |
#9
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
You would have to repeat the fields for each number you want to present.
i.e., the only mechanism in the field language for code re-use is copying the code. Another approach would be to create a query in Access that returns format(myfield,'Scientific') for each number in scientific format, then use that as the data source for your merge - e.g. SELECT *, format(myfield1,'Scientific') as [myfield1s], format(myfield2,'Scientific') as [myfield2s] FROM mytable You might need to provide specific formats rather than 'Scientific' to alter the precision and so on. Peter Jamieson "GCNY" wrote in message news ![]() Where? As a macro for each of the 8 Scientific format merge fileds or just once? "Doug Robbins - Word MVP" wrote: No, you would put the expression in the mail merge main document. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message news ![]() Thank you for the response. I will try it. In a QBE form do I set up an expression and enter this code after the colon? "Doug Robbins - Word MVP" wrote: The following was posted by fellow MVP Macropod: Quote The following compound field will return the scientific notation of any +ve value between 10^-9 and 10^9: {QUOTE {SET a {SourceVal}} {SET b{=9-(a10^9)-(a10^8)-(a10^7)-(a10^6)-(a10^5)-(a10^4)-(a10^3)-(a10^2) -(a10^1)-(a10^0)-(a10^-1)-(a10^-2)-(a10^-3)-(a10^-4)-(a10^-5)-(a10^- 6)-(a10^-7)-(a10^-8)}} {SET c{=int(a/10^b)+mod(a,10^b)/10^b}} {c \# 0.00}E{b \# +00;-00}} where 'SourceVal' is the input, which could be a formula taking its input from two formfields. You can extend the range easily enough by adding more terms. All the field braces (i.e. { }) are created in pairs via Ctrl-F9. I've laid the coding out with line breaks to separate the key portions of the coding, but you don't really need them. Unquote I am not sure if this will work with mailmerge, but I think that the thing to do would be to replace {SourceVal} with your Merge Field that contains the value. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message ... I have an Access 2003 database where some of the number fields are in scientific format. In Word 2003 when I insert the scientific formatted fields, they appear in decimal format. How can I handle this formatting problem? |
#10
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Hi Doug & GCNY,
A similar query about mailmerge with scientific notations appeared today in the docmanagement NG also. My suggested coding is: {QUOTE {SET z{MERGEFIELD dbValue}} {SET a{=ABS(z)}} {SET b{=9-(a10^9)-(a10^8)-(a10^7)-(a10^6)-(a10^5)-(a10^4)-(a10^3)-(a10^2)-(a10^1)-(a10^0)-(a10^-1)-(a10^-2)-(a10^-3)-(a10^-4)-(a10^-5)-(a10^-6)-(a10^-7)-(a10^-8)}} {SET c{=int(a/10^b)+mod(a,10^b)/10^b}} {c \# 0.00}E{b \# +00;-00}} where 'dbValue' is the mergefield's name. If the same value is to appear in multiple places, then bookmarking the above field and using cross-references to it would do the job. Otherwise, as Doug says, you'll need one copy of the Word field for each db field - a simple copy, paste & edit process once you've got the first field coded. The core of the above field is included in my Word Field Maths 'tutorial', at: http://www.wopr.com/cgi-bin/w3t/show...?Number=365442 Cheers -- macropod [MVP - Microsoft Word] ------------------------- "Doug Robbins - Word MVP" wrote in message ... The following was posted by fellow MVP Macropod: Quote The following compound field will return the scientific notation of any +ve value between 10^-9 and 10^9: {QUOTE {SET a {SourceVal}} {SET b{=9-(a10^9)-(a10^8)-(a10^7)-(a10^6)-(a10^5)-(a10^4)-(a10^3)-(a10^2) -(a10^1)-(a10^0)-(a10^-1)-(a10^-2)-(a10^-3)-(a10^-4)-(a10^-5)-(a10^- 6)-(a10^-7)-(a10^-8)}} {SET c{=int(a/10^b)+mod(a,10^b)/10^b}} {c \# 0.00}E{b \# +00;-00}} where 'SourceVal' is the input, which could be a formula taking its input from two formfields. You can extend the range easily enough by adding more terms. All the field braces (i.e. { }) are created in pairs via Ctrl-F9. I've laid the coding out with line breaks to separate the key portions of the coding, but you don't really need them. Unquote I am not sure if this will work with mailmerge, but I think that the thing to do would be to replace {SourceVal} with your Merge Field that contains the value. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "GCNY" wrote in message ... I have an Access 2003 database where some of the number fields are in scientific format. In Word 2003 when I insert the scientific formatted fields, they appear in decimal format. How can I handle this formatting problem? |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i insert scientific notation | Microsoft Word Help | |||
Scientific notation | Mailmerge | |||
Scientific Notebook? | Microsoft Word Help | |||
Scientific thesis writing - help!! | Page Layout | |||
scientific notation. | Microsoft Word Help |