Re: Using a bookmark and applying a switch to it



None of the other things I suggested reallly has a hope of being useful in
the environment you describe, so I'd start with Doug's suggestion and take
it from there.

Peter Jamieson
"Mark" <Mark@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:55A1BCA2-1298-42C9-9178-3C74100FEE60@xxxxxxxxxxxxxxxx
Hi Peter,

Thanks for your very detailed reply. Unfortunately, I came up short in
getting the transforms on the fields from working. The document is
presented
post-merge so it is as if the data fields are 'normal' text (as if the
merged
data was hard-coded into the template if that makes sense). I cannot view
through ALT-F9 or otherwise the field codes. Custom views, different ODBC
drivers or messing with the SQL is not possible as this is built within
the
executable which performs the merge function so I am residing to the
option
of formatting the text in the finished document. I am interested in the
Macros that you referred to and woudl really appreciate any link you may
have
to one.

Specifically, there are about 6 currency figures contained within a table
underneath each other.

Thanks again for your suggestions..

Mark

A macro is probably the best solution


Failing a satisfactory outcome from them - I'll

"Peter Jamieson" wrote:

The following kinds of manoevre have been known to help:

{ SET mylocalnumber { MERGEFIELD mynumber } }
{ REF mylocalnumber \#0.00 }
{ QUOTE { MERGEFIELD mynumber } \#0.00 }
{ SET mylocalnumber { QUOTE { MERGEFIELD mynumber } } }

(All the "{}" pairs have to be the special field code braces you can
insert
using ctrl-F9)

However, Word does sometimes have problems with certain types of numeric
data - e.g. "currency" type fields in Access databases have not always
behaved as you might hope. This could be another of those situations. If
you
insert a plain { MERGEFIELD mynumber } field, what do you see?

Unfortunately, I don't currently have an Oracle DBMS to test things with,
but assuming you are getting your data "directly" from your Oracle
database
(i.e., in Word 2000, via an Oracle ODBC driver), there are other things
you
could try, e.g.
a. there may still be two Oracle ODBC drivers - one provided by
Microsoft,
which takes you up to about Oracle 6 in compatibility terms but AFAIK can
read compatible type fields in later Oracle versions, and one provided by
Oracle (there are other third party drivers as well). Perhaps worth
trying
both.
b. Also worth exploring any options in the ODBC driver configuration.
c. Using Word VBA and the OpenDataSource method you can issue SQL that
may
be able to transform these numeric fields into something that Word can
handle. However, the length of the SQL statement is fairly limited (255
or
511 bytes or characters) and if you need to transform a lot of these
numbers
the SQL may become too long.

This assumes that you cannot create your own views in Oracle to give you
exactly what you need.

Going a bit further, other potential solutions include:
a. getting the Oracle data via another route (e.g. a Jet linked table,
or
via a csv format file)
b. using Word VBA and the Mailmerge objects to preprocess the data for
each
record before it is merged
c. using Word VBA to do one merge per record and preprocess the data for
each record before it is merged.

Let's hope one of the early suggestions (or one of macropod's) does the
trick. otherwise, you will find macros that can do (c) if you search this
group using Google Groups, or I can post something here.

Peter Jamieson
"Mark" <Mark@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4EC63C0E-C2E1-4DB4-92F0-C6418F61F8E1@xxxxxxxxxxxxxxxx
Hi.

I have an external application which merges data from an Oracle DB. We
need
to perform a switch on the data to reflect currency however, the
available
/#
switches do not apply and, instead, the field is then returned blank.
Selecting F9 does not show the Mergefield codings.

What I am reduced to understanding is that the mergefields are as is
stored
in the DB and cannot be represented.

I saw a reference some time back to a process whereby the mergefield is
brought into another section of the document and Bookmarked. Then, I
call
the
bookmark and apply the currency formatting to it instead of the
mergefield.
Can anyone refer me to an article which could explain how to do this or
perhaps, refer me to a sample VBA macro which can assist here.

Thanks in advance.





.



Relevant Pages

  • Re: Using a bookmark and applying a switch to it
    ... Unfortunately, I don't currently have an Oracle DBMS to test things with, ... Also worth exploring any options in the ODBC driver configuration. ... Using Word VBA and the OpenDataSource method you can issue SQL that may ... Selecting F9 does not show the Mergefield codings. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Using a bookmark and applying a switch to it
    ... Unfortunately, I don't currently have an Oracle DBMS to test things with, ... Also worth exploring any options in the ODBC driver configuration. ... Using Word VBA and the OpenDataSource method you can issue SQL that may ... Selecting F9 does not show the Mergefield codings. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Using a bookmark and applying a switch to it
    ... your suggested Macro works a treat! ... Unfortunately, I don't currently have an Oracle DBMS to test things with, ... Also worth exploring any options in the ODBC driver configuration. ... Selecting F9 does not show the Mergefield codings. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Need help with Access 97 and Oracle 9i
    ... I'm trying to make the connection on the my local machine. ... discussed using ODBC driver to connect to Oracle. ... I found that the Microsoft ODBC Driver doesn't ... I'm looking for anything I can get; suggestions, recommendations, ...
    (microsoft.public.access.externaldata)
  • RE: ORACLE DRIVER
    ... The thing is that I'm using in a Linux machine. ... So is there any free Oracle ODBC driver for Linux? ... UnixODBC is a freeware but couldn't find any free Oracle Drivers. ...
    (perl.dbi.users)