On Wed, 10 Jun 2009 08:25:24 +0100, Peter Jamieson
Hi Peter,
I very much appreciate your comments...
Please see my responses inline below:
A number of people have reported this kind of problem over the years but
unfortunately I have never got to the bottom of it. There were
definitely problems at one point with some types of data source
disappearing if you specified sort/filter options.
I have no sorting, or filtering in place.
Here is the context:
I have all of our data stored in a database ('happens to be
Paradox.)
In order to take advantage of the printing-related
functionality available in Word (but not in Paradox) I have
a variety of applets in Paradox that all operate in the same
general way -
They pull data from our tables, organize them appropriately,
dump to txt files, and then call Word macros to print from
those data. The macro then closes Word, and focus returns to
Paradox.
We use this process for our invoicing, seminar welcome
letters, label printing etc.
Otherwise, assuming
that you have not moved or renamed your data sources, some possible
"explanations" are that
The data have not been moved, or renamed.
a. there is a new security check (e.g. if your data source is on a
network drive, or even on a local hard disk
Our data are on a network drive (but have been all along...)
Hmmm... Things just got more interesting:
I have experimented with this every way I could try, but the
connection to the datasource simply could not be saved.
Then, moments ago, I tried copying the data source to a new
local location.
With that, the data connection to the template could be
saved successfully.
So, should there be no other way, I do now have a
workaround, but it would require my re-writing a significant
amount of code, and I would certainly prefer not to do that,
b. something truncates the connection string stored in the .dot
c. there is a problem with both .dot and the derived .doc opening the
same data source.
There can also be a problem as follows:
a. you /have/ moved your data source
b. when Word cannot find it, it prompts you to look for it
c. you locate and reconnect
d. you save your mailmerge main document
In some cases Word does not seem to update the connection information
and the same problem then occurs when you next open the document. /That/
problem can sometimes be avoided if you first disconnect the data source
altogether (e.g. by changing the mail merge man document type back to
"Normal Word Document), /then/ connect the data source and save again.
Perhaps worth trying that with one of your .dot files.
I tried that, but it did not work (until, as I describe
above, I moved the datasource.)
But it would be useful to know the details of your data source: what
type of data source, where is it located, have you specified any
query/filter options (also, do your .dots still have separate header
sources?
The datasource is always a txt file. When located on the
lan, the connection to the dot fails. When local, it
succeeds. There is no query, or filtering. None of the dots
have a separate header source.
And, I will add one other thing:
I believe that this may be some sort of macro security
related problem because when using the automated procedures
I have described, I started seeing a dialog that said (in
effect) you are about to call a SQL command, do you wish to
continue?"
I would click "OK" and the automated process would move to
completion.
But, to eliminate the interruption, I lowered the macro
security level.
Hmmm (again)... The problem is solved!
I just went in to Word Options | Security to check the level
to which I had set macro security.
I had it set to "Low" as I recalled, but then noticed the
"Trusted Sources" tab for the first time.
In there, I saw that "Trust access to Visual Basic project"
was not checked.
I did check it (though I don't remember ever having seen it
before) and that solved the problem.
I am posting all this in the hope that it might assist
someone else, and again, offer you my sincere thanks,