Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Program Throwing error after Installing Microsoft 2016

Former Member
0 Kudos

Dear Experts,

I am having program to create word Document using OLE. Program was working perfectly earlier (Microsoft 2010) before updating Microsoft 2016.

Program is working fine on local machine having Microsoft 2010 / 2013 but throwing error on machine having Microsoft 2016.

Program functionality:

Program create one .txt file at local machine and then convert this file in to .doc file and Replace/Delete the .txt file.

Your Help/Suggestion will be appreciated.

Thanks,

Chandra Shekhar Agihotri

11 REPLIES 11

roberto_vacca2
Active Contributor
0 Kudos

Hi.

Please give some details on error thrown by your application.

Hope to help

Bye

0 Kudos

Hi Roberto,

Program is creating the file 1 txt file  on local  machine then open that file in edit mode and select all the data and try to create the table.

When try to create the table, program getting the Communication error.

(CALL METHOD OF wordobj 'TextToTable'')

Below is the program code for better understanding

Regards,

Chandra Shekhar Agnihotri

0 Kudos

Hi..

Well you get sy-subrc 1 from Method TextToTable.

It seems that method "Open" of documents with ReadOnly it's OK, and EditSelectAll method too.

I suggest you to put a code to paste value of txt in document and close it and then try to use TextToTable method.

Hope To help

Bye

0 Kudos

Hi Roberto,

The same code was working fine with Microsoft 2010 and Program start throwing error after upgrading the Microsoft Office from 2010 to 2016. and same program is still working fine on machines having Microsoft 2010

You mean to say I have to change the code of each and every program where the program throwing error due to office upgrade.....Is this the right solution..?

Regards,

Chandra Shekhar

0 Kudos

Unless I'm completely mistaken, Microsoft Office 2016 is only supported as of patch level 5 of SAP GUI for Windows 7.40 (you can find the relevant SAP notes in the link I posted earlier)

0 Kudos

Hi Nierop,

I have SAP GUI 7.40 patch level 7. So I don't think that GUI is the issue.

Regards,

Chandra Shekhar Agnihotri

0 Kudos

No.

You say 2013 is ok and that sounds good but if not I read something about a problem with TextToTable method with 2013 that is not supported.

Note 1888226.

Solution can be a workaround of method "TextToTable" using a Macro for the *.doc word file.

0 Kudos

Hi Reberto,

you are right. The old Microsoft office was 2010.

Can you please suggest the workaround for "TextToTable " method.

Regards,

Chandra Shekhar

0 Kudos

Hi.

Sorry for delay.

You should create a Doc model in word with a macro saved behind (calling that such "TextToTab". This macro will reply your steps ...select all text inside and click on Table=> Convert textTotable function)

Then once you open your TXT,  copy that content into this model DOC and then run macro from this doc model

CALL METHOD OF wordobj 'RUN'

EXPORTING

#1 = 'TextToTab'.

This macro would be better if you know something of VB. It could receive also the text you want to convert .

This should work.

Bye

0 Kudos

Thanks Roberto,

I did corrections suggested in note 1888226 and it works.

Regards,

Chandra Shekhar

Patrick_vN
Active Contributor
0 Kudos

Maybe this can be a source of inspiration?