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