Address block match fields do not get saved

R

ramudu

Hi,

Our software has a mail merge functionality where we get the data
source for the Word document (Office 2003) from an Excel spreadsheet.
The software allows you to create the template document and then later
send out correspondence as and when required by writing out the data to
the spreadsheet and linking the Word document to it.

Once the template Word document is created, it is then picked up by the
software as a byte stream and stored in a (SQL Server 2000) database as
an image field.

The problem I am facing is that one of our clients tried using the
Match Fields functionality of the Address Block and when the person
opened the document again from the software the fields which were
previously linked to the spreadsheet were now dropped.

I tried manually opening (from the disk) the Word document and I saw
the Match Fields were still there. So it seems to be a problem when the
file is saved into the database and then retrieved.

What can I do to resolve this issue? If anybody needs any code snippets
from the application I can provide that on request.

Thanks!

- Sri
 
D

Doug Robbins - Word MVP

Don't use the AddressBlock. It causes more problems than it solves.

--
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
 
R

ramudu

Thanks Doug! Unfortunately, I can't tell my client this (at least until
things get desperate) :) ...

- Sri
 
P

Peter Jamieson

If your software has to disconnect the data source as part of the process,
all the mappings will be lost. If that is what is happening (and it seems
quite likely to me) then either your software can inspect the mappings
before the original data source is disconnected, or it is not.

If it can, then you /may/ be able to save and restore the mappings, as long
as all the column names used in the original data source also exist in the
one you attach (of course)

If it cannot, then I think the only way to proceed, other than dissuading
your client from using the ADDRESSBLOCK field, is to provide some software
that saves the mapping information, before the mail merge main document is
saved into the Oracle database, and get your software to restore the info.
when it extracts the document. For example, you could save the mapping info.
in a set of document variables.

(But I haven't verified that youcan restore the mapping - I seem to remember
that there can be problems in this area).

This is one of the many problems that make it easier to avoid using the
ADDRESSBLOCK as Doug suggests - unless of course, it just happens to work
with the data source you happen to have (in which case the chances are you
won't have to do any mappings anyway).

Peter Jamieson
 
G

Graham Mayor

Why not? AddressBlock doesn't work properly.Your client is presumably paying
you for advice. Better to give him good advice.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
R

ramudu

Thanks guys. It looks like I'll have to dissuade from using
AddressBlock. The reason they were using this is that we have multiple
Address fields and AddressBlock formats them in a much neater way.

- Sri
 
D

Doug Robbins - Word MVP

There is nothing preventing the user from arranging the individual fields in
exactly the same arrangement as that used by the addressblock.

--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top