Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Chris Chris is offline
external usenet poster
 
Posts: 237
Default Mailmerge directories not working Word 2003

Any help/info will be of GREAT use

We have a system programatically linking to Word to create mailmerge
documents. this has always worked fine up to and including 2003. One of our
customers has recently upgraded to Word 2003 and experienced problems with a
directory mail merge document .

Upon investigation I have discovered that when a mail merge master document
has it's datasource attached Word cannot understand what kind of document it
is and defaults to Form Letters. With it's datasource detached then Word
reads the document correctly

Has anybody else experienced this and have a solution for the problem

Detaching the datasource from all documents is a workaround but messy
Programmatically setting the document type in code (which does work) is
alos not an option since the code handles both Form Letters and Directories
and does not distinguish between them

again any help gratefully recieved
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mailmerge directories not working Word 2003

I have not been able to replicate this problem and have never heard of it
before.

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

"Chris" wrote in message
...
Any help/info will be of GREAT use

We have a system programatically linking to Word to create mailmerge
documents. this has always worked fine up to and including 2003. One of
our
customers has recently upgraded to Word 2003 and experienced problems with
a
directory mail merge document .

Upon investigation I have discovered that when a mail merge master
document
has it's datasource attached Word cannot understand what kind of document
it
is and defaults to Form Letters. With it's datasource detached then Word
reads the document correctly

Has anybody else experienced this and have a solution for the problem

Detaching the datasource from all documents is a workaround but messy
Programmatically setting the document type in code (which does work) is
alos not an option since the code handles both Form Letters and
Directories
and does not distinguish between them

again any help gratefully recieved



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Mailmerge directories not working Word 2003

From your description it is difficult to make sense of what is happening -
it would help if you could say a bit more about what your software actually
does.

A Word document can either have
a. a Mail merge document type set up (or "Normal Word Document")
b. a mail merge data source set up (in which case, there will be a mail
merge document type that is /not/ "Normal Word Document"

The user can easily set up (a) using the Mail Merge Helper in Word 2000, or
the Wizard/Toolbar in 2003.

If the user tries to set up (b) in either program (manually or
programmatically) without first setting up (a), then Word will default to
Form Letters.

Once (b) has been set up, the only simple way for the user to get rid of the
data source manually or programmatically is to set the Mail Merge Main
document type to Normal Word Document, in which case no information is
retained about the mail merge document type. (Actualoly if you try to do
this in Word 2003 using the old MailMergeHelper, you seem to end up with a
mail merge main document type that displays as blank but is in fact "Email".
Also, in Word 2003 you can programmatically close the Data Source using the
Close method of the DataSource object/property, leaving the mail merge main
document type intact).

So I would say that there is little difference in behaviour - unless the
user has gone to the trouble of specifying a mail merge main document type
or the document already has a data source attached, a piece of software
cannot tell what the main document type is supposed to be.

What I suspect is happening is that
a. your software simply takes existing mail merge documents with all their
document type and data source info. intact, and merges them
b. in Word 2003 the user has found that having an existing data source gets
in the way, and has removed it. If they do it in the usual way, that would
also remove the mail merge main document type information. But your program
would not just have to restore the type information - it would also have to
restore the data source. (which is why I can't quite see what you're
actually doing)

I think you may have to insist that your user at least sets up the mail
merge main document type for you (it can be done very easily using the mail
merge toolbar, for example)

Peter Jamieson
"Chris" wrote in message
...
Any help/info will be of GREAT use

We have a system programatically linking to Word to create mailmerge
documents. this has always worked fine up to and including 2003. One of
our
customers has recently upgraded to Word 2003 and experienced problems with
a
directory mail merge document .

Upon investigation I have discovered that when a mail merge master
document
has it's datasource attached Word cannot understand what kind of document
it
is and defaults to Form Letters. With it's datasource detached then Word
reads the document correctly

Has anybody else experienced this and have a solution for the problem

Detaching the datasource from all documents is a workaround but messy
Programmatically setting the document type in code (which does work) is
alos not an option since the code handles both Form Letters and
Directories
and does not distinguish between them

again any help gratefully recieved



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Chris Chris is offline
external usenet poster
 
Posts: 237
Default Mailmerge directories not working Word 2003

Deepest apologies for the confusion Peter (& Doug )

What the system does is take a mail merge document , create an CSV outputs
file from a database by use of various routines then merge the two together

The user manually sets up a mail merge document using the mail merge
helper/toolbar and attaches a datasource (with no data) to add fields into
the master document.

the program then uses this master document , creates a new datasource (with
data ) , programatically atatches the new datasource and then merges the
master document and the new datasource .

The progam does not use Macros and only uses connection to Word via OLE
objects


You can duplicate this problems by using the code in a vb.net project

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim test As New Word.Application
Dim doc As New Word.Document
Dim ret, result As Integer


test = New Word.Application

test.Visible = True
doc = test.Documents.Open(any directory master document name )

result = doc.MailMerge.MainDocumentType()

MsgBox(Convert.ToString(result))

test.Quit()
End Sub

If you try this with a 'normal' mail merge document with a datasource
attached you will find that the document type variable is returned as -1
If you detach the datasource the document type is returned correctly

By detaching the datasource I mean I manually (using the toolbar) change the
master document back to a normal word document then recreate it as a
directory document but when I get to Step 3 on the mail merge wizzard (
Select Reciepients ) I do not attach a datasource . This will obviously
create a Master document with no datasource

I should also point out this this error does not occur when the above code
is placed in a macro (We do not use macros for this because of problems of
shipping macros to multiple sites)

From my investigations there appears to be something either intrinsically
wrong with the way I am manually setting Master documents up and attaching
datasources using the mail merge toolbar or something intrinsically wrong
wtih Word OLE mail merge

hopefuly this has given you more info , if not feel free to email me direct
if required or reply to this post

thanks for you interest

Chris


"Peter Jamieson" wrote:

From your description it is difficult to make sense of what is happening -
it would help if you could say a bit more about what your software actually
does.

A Word document can either have
a. a Mail merge document type set up (or "Normal Word Document")
b. a mail merge data source set up (in which case, there will be a mail
merge document type that is /not/ "Normal Word Document"

The user can easily set up (a) using the Mail Merge Helper in Word 2000, or
the Wizard/Toolbar in 2003.

If the user tries to set up (b) in either program (manually or
programmatically) without first setting up (a), then Word will default to
Form Letters.

Once (b) has been set up, the only simple way for the user to get rid of the
data source manually or programmatically is to set the Mail Merge Main
document type to Normal Word Document, in which case no information is
retained about the mail merge document type. (Actualoly if you try to do
this in Word 2003 using the old MailMergeHelper, you seem to end up with a
mail merge main document type that displays as blank but is in fact "Email".
Also, in Word 2003 you can programmatically close the Data Source using the
Close method of the DataSource object/property, leaving the mail merge main
document type intact).

So I would say that there is little difference in behaviour - unless the
user has gone to the trouble of specifying a mail merge main document type
or the document already has a data source attached, a piece of software
cannot tell what the main document type is supposed to be.

What I suspect is happening is that
a. your software simply takes existing mail merge documents with all their
document type and data source info. intact, and merges them
b. in Word 2003 the user has found that having an existing data source gets
in the way, and has removed it. If they do it in the usual way, that would
also remove the mail merge main document type information. But your program
would not just have to restore the type information - it would also have to
restore the data source. (which is why I can't quite see what you're
actually doing)

I think you may have to insist that your user at least sets up the mail
merge main document type for you (it can be done very easily using the mail
merge toolbar, for example)

Peter Jamieson
"Chris" wrote in message
...
Any help/info will be of GREAT use

We have a system programatically linking to Word to create mailmerge
documents. this has always worked fine up to and including 2003. One of
our
customers has recently upgraded to Word 2003 and experienced problems with
a
directory mail merge document .

Upon investigation I have discovered that when a mail merge master
document
has it's datasource attached Word cannot understand what kind of document
it
is and defaults to Form Letters. With it's datasource detached then Word
reads the document correctly

Has anybody else experienced this and have a solution for the problem

Detaching the datasource from all documents is a workaround but messy
Programmatically setting the document type in code (which does work) is
alos not an option since the code handles both Form Letters and
Directories
and does not distinguish between them

again any help gratefully recieved




  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Mailmerge directories not working Word 2003

It's more or less as I guessed.

However, if you set up the SQLSecurityCheck registry value as described in
the following article, your code will probably work again:

http://support.microsoft.com/kb/825765/

Peter Jamieson

"Chris" wrote in message
...
Deepest apologies for the confusion Peter (& Doug )

What the system does is take a mail merge document , create an CSV outputs
file from a database by use of various routines then merge the two
together

The user manually sets up a mail merge document using the mail merge
helper/toolbar and attaches a datasource (with no data) to add fields
into
the master document.

the program then uses this master document , creates a new datasource
(with
data ) , programatically atatches the new datasource and then merges the
master document and the new datasource .

The progam does not use Macros and only uses connection to Word via OLE
objects


You can duplicate this problems by using the code in a vb.net project

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim test As New Word.Application
Dim doc As New Word.Document
Dim ret, result As Integer


test = New Word.Application

test.Visible = True
doc = test.Documents.Open(any directory master document name )

result = doc.MailMerge.MainDocumentType()

MsgBox(Convert.ToString(result))

test.Quit()
End Sub

If you try this with a 'normal' mail merge document with a datasource
attached you will find that the document type variable is returned as -1
If you detach the datasource the document type is returned correctly

By detaching the datasource I mean I manually (using the toolbar) change
the
master document back to a normal word document then recreate it as a
directory document but when I get to Step 3 on the mail merge wizzard (
Select Reciepients ) I do not attach a datasource . This will obviously
create a Master document with no datasource

I should also point out this this error does not occur when the above code
is placed in a macro (We do not use macros for this because of problems of
shipping macros to multiple sites)

From my investigations there appears to be something either intrinsically
wrong with the way I am manually setting Master documents up and attaching
datasources using the mail merge toolbar or something intrinsically wrong
wtih Word OLE mail merge

hopefuly this has given you more info , if not feel free to email me
direct
if required or reply to this post

thanks for you interest

Chris


"Peter Jamieson" wrote:

From your description it is difficult to make sense of what is
happening -
it would help if you could say a bit more about what your software
actually
does.

A Word document can either have
a. a Mail merge document type set up (or "Normal Word Document")
b. a mail merge data source set up (in which case, there will be a mail
merge document type that is /not/ "Normal Word Document"

The user can easily set up (a) using the Mail Merge Helper in Word 2000,
or
the Wizard/Toolbar in 2003.

If the user tries to set up (b) in either program (manually or
programmatically) without first setting up (a), then Word will default to
Form Letters.

Once (b) has been set up, the only simple way for the user to get rid of
the
data source manually or programmatically is to set the Mail Merge Main
document type to Normal Word Document, in which case no information is
retained about the mail merge document type. (Actualoly if you try to do
this in Word 2003 using the old MailMergeHelper, you seem to end up with
a
mail merge main document type that displays as blank but is in fact
"Email".
Also, in Word 2003 you can programmatically close the Data Source using
the
Close method of the DataSource object/property, leaving the mail merge
main
document type intact).

So I would say that there is little difference in behaviour - unless the
user has gone to the trouble of specifying a mail merge main document
type
or the document already has a data source attached, a piece of software
cannot tell what the main document type is supposed to be.

What I suspect is happening is that
a. your software simply takes existing mail merge documents with all
their
document type and data source info. intact, and merges them
b. in Word 2003 the user has found that having an existing data source
gets
in the way, and has removed it. If they do it in the usual way, that
would
also remove the mail merge main document type information. But your
program
would not just have to restore the type information - it would also have
to
restore the data source. (which is why I can't quite see what you're
actually doing)

I think you may have to insist that your user at least sets up the mail
merge main document type for you (it can be done very easily using the
mail
merge toolbar, for example)

Peter Jamieson
"Chris" wrote in message
...
Any help/info will be of GREAT use

We have a system programatically linking to Word to create mailmerge
documents. this has always worked fine up to and including 2003. One of
our
customers has recently upgraded to Word 2003 and experienced problems
with
a
directory mail merge document .

Upon investigation I have discovered that when a mail merge master
document
has it's datasource attached Word cannot understand what kind of
document
it
is and defaults to Form Letters. With it's datasource detached then
Word
reads the document correctly

Has anybody else experienced this and have a solution for the problem

Detaching the datasource from all documents is a workaround but messy
Programmatically setting the document type in code (which does work)
is
alos not an option since the code handles both Form Letters and
Directories
and does not distinguish between them

again any help gratefully recieved








  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Chris Chris is offline
external usenet poster
 
Posts: 237
Default Mailmerge directories not working Word 2003

thanks Peter that has fixed the problem

"Peter Jamieson" wrote:

It's more or less as I guessed.

However, if you set up the SQLSecurityCheck registry value as described in
the following article, your code will probably work again:

http://support.microsoft.com/kb/825765/

Peter Jamieson

"Chris" wrote in message
...
Deepest apologies for the confusion Peter (& Doug )

What the system does is take a mail merge document , create an CSV outputs
file from a database by use of various routines then merge the two
together

The user manually sets up a mail merge document using the mail merge
helper/toolbar and attaches a datasource (with no data) to add fields
into
the master document.

the program then uses this master document , creates a new datasource
(with
data ) , programatically atatches the new datasource and then merges the
master document and the new datasource .

The progam does not use Macros and only uses connection to Word via OLE
objects


You can duplicate this problems by using the code in a vb.net project

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim test As New Word.Application
Dim doc As New Word.Document
Dim ret, result As Integer


test = New Word.Application

test.Visible = True
doc = test.Documents.Open(any directory master document name )

result = doc.MailMerge.MainDocumentType()

MsgBox(Convert.ToString(result))

test.Quit()
End Sub

If you try this with a 'normal' mail merge document with a datasource
attached you will find that the document type variable is returned as -1
If you detach the datasource the document type is returned correctly

By detaching the datasource I mean I manually (using the toolbar) change
the
master document back to a normal word document then recreate it as a
directory document but when I get to Step 3 on the mail merge wizzard (
Select Reciepients ) I do not attach a datasource . This will obviously
create a Master document with no datasource

I should also point out this this error does not occur when the above code
is placed in a macro (We do not use macros for this because of problems of
shipping macros to multiple sites)

From my investigations there appears to be something either intrinsically
wrong with the way I am manually setting Master documents up and attaching
datasources using the mail merge toolbar or something intrinsically wrong
wtih Word OLE mail merge

hopefuly this has given you more info , if not feel free to email me
direct
if required or reply to this post

thanks for you interest

Chris


"Peter Jamieson" wrote:

From your description it is difficult to make sense of what is
happening -
it would help if you could say a bit more about what your software
actually
does.

A Word document can either have
a. a Mail merge document type set up (or "Normal Word Document")
b. a mail merge data source set up (in which case, there will be a mail
merge document type that is /not/ "Normal Word Document"

The user can easily set up (a) using the Mail Merge Helper in Word 2000,
or
the Wizard/Toolbar in 2003.

If the user tries to set up (b) in either program (manually or
programmatically) without first setting up (a), then Word will default to
Form Letters.

Once (b) has been set up, the only simple way for the user to get rid of
the
data source manually or programmatically is to set the Mail Merge Main
document type to Normal Word Document, in which case no information is
retained about the mail merge document type. (Actualoly if you try to do
this in Word 2003 using the old MailMergeHelper, you seem to end up with
a
mail merge main document type that displays as blank but is in fact
"Email".
Also, in Word 2003 you can programmatically close the Data Source using
the
Close method of the DataSource object/property, leaving the mail merge
main
document type intact).

So I would say that there is little difference in behaviour - unless the
user has gone to the trouble of specifying a mail merge main document
type
or the document already has a data source attached, a piece of software
cannot tell what the main document type is supposed to be.

What I suspect is happening is that
a. your software simply takes existing mail merge documents with all
their
document type and data source info. intact, and merges them
b. in Word 2003 the user has found that having an existing data source
gets
in the way, and has removed it. If they do it in the usual way, that
would
also remove the mail merge main document type information. But your
program
would not just have to restore the type information - it would also have
to
restore the data source. (which is why I can't quite see what you're
actually doing)

I think you may have to insist that your user at least sets up the mail
merge main document type for you (it can be done very easily using the
mail
merge toolbar, for example)

Peter Jamieson
"Chris" wrote in message
...
Any help/info will be of GREAT use

We have a system programatically linking to Word to create mailmerge
documents. this has always worked fine up to and including 2003. One of
our
customers has recently upgraded to Word 2003 and experienced problems
with
a
directory mail merge document .

Upon investigation I have discovered that when a mail merge master
document
has it's datasource attached Word cannot understand what kind of
document
it
is and defaults to Form Letters. With it's datasource detached then
Word
reads the document correctly

Has anybody else experienced this and have a solution for the problem

Detaching the datasource from all documents is a workaround but messy
Programmatically setting the document type in code (which does work)
is
alos not an option since the code handles both Form Letters and
Directories
and does not distinguish between them

again any help gratefully recieved






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to put graphics on envelopes? Steve Koenig Microsoft Word Help 21 April 29th 23 02:47 AM
take yet another lesson from wordperfect "reveal codes" wordperfect is superior Microsoft Word Help 5 May 11th 09 07:58 PM
WP merge file to Word sstires Tables 4 February 14th 06 06:26 PM
Word 97 templates not working properly in Word 2003 limited computer knowledge Microsoft Word Help 0 April 26th 05 02:07 AM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM


All times are GMT +1. The time now is 07:16 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"