Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to merge word and excel Office 365 Proplus from powerbuilder 12.5 application

55 views
Skip to first unread message

dc0...@googlemail.com

unread,
Aug 26, 2016, 7:54:54 AM8/26/16
to

Hi guys,


i have a problem when trying to merge a word to excel (Office 365) through powerbuilder 12.5 application.

The below code is working fine in earlier versions of Office... But not in Office 365 Proplus..

Have a look, and if someone have a suggestion please dont hesitate,, any reply would be really appreciated!!

The code for the Microsoft Office transactions...

if ll_systemPrintouts = iuo_tools.MS_OFFICE then

oleobject iole_word
long ll_Error
iole_word = CREATE oleobject
ll_Error = iole_word.ConnectToNewobject("word.application")

CHOOSE CASE ll_Error
CASE -1, -2, -3, -4, -9, -15, -16
word_exception luo_exception
luo_exception.setmessage ( "The application cannot connects with Word" )
luo_exception.setexplain ( "Code Error: " + String ( ll_Error ) )
Throw luo_exception
END CHOOSE

iole_word.Documents.Open( ls_path )

iole_word.ActiveDocument.MailMerge.MainDocumentType = 0
iole_word.ActiveDocument.MailMerge.OpenDataSource( ls_DataSourceFile,0,false,false,false,false,"","",false, &
"", "", "Entire Spreadsheet", "SELECT * FROM 'Sheet1$'", "", false, 8)
iole_word.ActiveDocument.MailMerge.Destination = 0
iole_word.Application.Visible = abl_visible

return iole_word

else
.....
Bear in mind that the applications crashes on , ActiveDocument.MailMerge.OpenDataSource

Please guys some help... cause i m so stack in this point and dont know what to do :(

Thank you in advance
0 new messages