Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / October 2006

Tip: Looking for answers? Try searching our database.

Mail Merge issue with Word 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Srinivasan.B - 04 May 2005 05:44 GMT
1) We print communication letter to customers using Mail merge
2) Our Application based Oracle and Forms6i
3) It was working fine until Windows upgraded with Word 2003
4) With Word 2003, Letter is not printed. Only Data source coming out, Mail
merge
   didn't happen.
5) Please suggest the solution such way that it works with both versions.
Graham Mayor - 04 May 2005 05:57 GMT
Mail merge was completely revised after Word 2000.
http://www.gmayor.com/mail_merge_labels_with_word_xp.htm  explains how to
get it back to near what you are used to - especially see the Excel data
section which bears similar issues. If you have a custom macro drive
application then it is going to have to be revised to take account of the
changes and is unlikely to work in both versions.

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> 1) We print communication letter to customers using Mail merge
> 2) Our Application based Oracle and Forms6i
[quoted text clipped - 4 lines]
> 5) Please suggest the solution such way that it works with both
> versions.
Srinivasan.B - 12 May 2005 05:12 GMT
Hi,

Let me explain the scenario clearly so that the cause of the error is clear.

We are invoking this from a Developer 2000 Application written in PL/SQL.
The code to do the same is reproduced below.

--open the data source

APPLICATION  :=  OLE2.CREATE_OBJ('Word.Basic');
  -- Open the mail merge data source document
  OLE2.SET_PROPERTY(application, 'Visible', 'False');
  ARGS:=OLE2.CREATE_ARGLIST;
  OLE2.ADD_ARG(ARGS, M_DS_PATH);
  OLE2.INVOKE(APPLICATION, 'FileOpen', ARGS);
  OLE2.DESTROY_ARGLIST(ARGS);

--invoke the application to show the document
ARGS:=OLE2.CREATE_ARGLIST;
  OLE2.ADD_ARG(ARGS, M_SRC_FILE_PATH||'\'||M_RS_REPORT_NAME);
  OLE2.INVOKE(APPLICATION, 'FileOpen', ARGS);
  OLE2.DESTROY_ARGLIST(ARGS);

  -- Perform the mail merge to create the merged document
  OLE2.INVOKE(APPLICATION,'MailMergeToDoc');

We would like to know why this fails in Word 2003 whereas it works in Word
2000. Is there any repository which explains the changes done to Word 2003
w.r.t Mail Merge.

Thanks and regards,

Srinivasan

> Mail merge was completely revised after Word 2000.
> http://www.gmayor.com/mail_merge_labels_with_word_xp.htm  explains how to
[quoted text clipped - 11 lines]
> > 5) Please suggest the solution such way that it works with both
> > versions.
Peter Jamieson - 21 May 2005 13:24 GMT
I suspect that this problem occurs for one of the following three reasons:
a. changes in security - see
http://support.microsoft.com/default.aspx?scid=kb;en-us;825765 . In essence,
when you open a merge document programmatically, the connection to the data
source usually fails, and that will be without warning if the error is not
trapped
b. changes in the way Word connects to data sources - specifically, there
is an additional parameter in OpenDataSource calls that you have to use if
you want to use the older Word 2000 methods. (Actually I doubt that this is
relevant in this case unless you are connecting to the data source
programmatically)
c. (maybe) changes to Word 2003 related to the way old WordBasic routines
are executed. I am not aware of any such changes but it would not surprise
me if they existed.

Peter Jamieson

> Hi,
>
[quoted text clipped - 46 lines]
>> > 5) Please suggest the solution such way that it works with both
>> > versions.
klith2003 - 14 Mar 2006 13:17 GMT
have you finally found a solution to this issue because I 'm facing the
same problem.

Signature

klith2003

Doug Robbins - Word MVP - 14 Mar 2006 20:27 GMT
What was the problem?

Signature

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

> have you finally found a solution to this issue because I 'm facing the
> same problem.
eufemia - 25 Oct 2006 17:12 GMT
I 'm facing the same problem
Any Soluction??

--
eufemi

Posted from - http://www.officehelp.i
Doug Robbins - Word MVP - 25 Oct 2006 18:24 GMT
The same problem probably means something to you, but it does not to me and
probably does not to anyone else who frequents these newsgroups.

Tell us what it is and we will try and help.

Signature

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

> I 'm facing the same problem.
> Any Soluction???
eufemia - 26 Oct 2006 12:41 GMT
Well, the next function was 100% in oracle form6i with word 2000 and th
same function does not work with word 2003

..
application:=OLE2.CREATE_OBJ('Word.Basic')

args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, 'Fields.doc')
OLE2.INVOKE(application, 'FileOpen', args)
OLE2.DESTROY_ARGLIST(args)

OLE2.INVOKE(application, 'NextCell')
OLE2.INVOKE(application, 'NextCell')
OLE2.INVOKE(application, 'NextCell')
OLE2.INVOKE(application, 'NextCell')
OLE2.INVOKE(application, 'NextCell')
OLE2.INVOKE(application, 'NextCell')
OLE2.INVOKE(application, 'NextCell')

FOR CL_REC IN C1 LOO

OLE2.INVOKE(application, 'NextCell')
args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, CL_REC.NAME)
OLE2.INVOKE(application, 'Insert', args)
OLE2.DESTROY_ARGLIST(args)

OLE2.INVOKE(application, 'NextCell')
args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, CL_REC.ADDRESS)
OLE2.INVOKE(application, 'Insert', args)
OLE2.DESTROY_ARGLIST(args)

OLE2.INVOKE(application, 'NextCell')
args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, CL_REC.LOCAL)
OLE2.INVOKE(application, 'Insert', args)
OLE2.DESTROY_ARGLIST(args)

OLE2.INVOKE(application, 'NextCell')
args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, CL_REC.POST_CODE)
OLE2.INVOKE(application, 'Insert', args)
OLE2.DESTROY_ARGLIST(args)

OLE2.INVOKE(application, 'NextCell')
args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, CL_REC.POST_CODE_EXT)
OLE2.INVOKE(application, 'Insert', args)
OLE2.DESTROY_ARGLIST(args)

OLE2.INVOKE(application, 'NextCell')
args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, CL_REC.POST_DESCRIPTION)
OLE2.INVOKE(application, 'Insert', args)
OLE2.DESTROY_ARGLIST(args)

OLE2.INVOKE(application, 'NextCell')
args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, CL_REC.MOVIE)
OLE2.INVOKE(application, 'Insert', args)
OLE2.DESTROY_ARGLIST(args)

OLE2.INVOKE(application, 'NextCell')
args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, CL_REC.CATEGORY)
OLE2.INVOKE(application, 'Insert', args)
OLE2.DESTROY_ARGLIST(args)

END LOOP

args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, 'Mask.doc')
OLE2.INVOKE(application, 'FileOpen', args)
OLE2.DESTROY_ARGLIST(args)

OLE2.INVOKE(application, 'MailMergeToDoc')

args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, 'Mail_Out.doc')
OLE2.INVOKE(application, 'FileSaveAs', args)
OLE2.DESTROY_ARGLIST(args)

args:=OLE2.CREATE_ARGLIST
OLE2.ADD_ARG(args, 2)
OLE2.INVOKE(application, 'FileCloseAll', args)
OLE2.DESTROY_ARGLIST(args)

OLE2.INVOKE(application, 'AppClose')
OLE2.RELEASE_OBJ(application)
.

The file 'Fields.doc' is a word doc with tables that is filled wit
data
The file 'Mask.doc' is a template word doc with fields connected t
'Fields.doc' to do the merge
The file 'Mail_Out.doc' is suposed to be the mailing itself. but wit
word2003 this 'Mail_Out.doc' only have the template and the name of th
filds that suposed to be merged, withou the data from merge

Thak's for your answer

--
eufemi

Posted from - http://www.officehelp.i
Peter Jamieson - 26 Oct 2006 14:46 GMT
The chances are that with Word 2003 you need to take account of the
following article:

http://support.microsoft.com/kb/825765/en-us

Although there could also be an issue with the use of the Word.Basic object
and you might need to change your code to use the Word.Application object,
I'd try making the registry modification described in the article on a test
system first, to see if that's enough.

Peter Jamieson

> Well, the next function was 100% in oracle form6i with word 2000 and the
> same function does not work with word 2003!
[quoted text clipped - 97 lines]
>
> Thak's for your answer.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.