Skip to Content
0

MS Word 2016 is not working on PB11.5.1

Jun 01, 2017 at 08:56 PM

165

avatar image
Former Member

Hi,

I'm opening a winword.exe in DDE via OpenChannel('WINWORD', 'SYSTEM') in MS 2010 ,its working fine without any issues but its not working in MS 2016.
While opening the winword.exe in safe mode through "RUN()",it got struck and hanged up the application.Its happening in pb11.5.1 version.

Instead of OpenChannel(),if i'll open a word via OLEObject, can i use 'ExecRemote' functions?

Appreciate the quick reply on this..thanks :)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

René Ullrich Jun 02, 2017 at 06:11 AM
0

We have no problem using Winword 2016 via OLEObject. But we don't use ExecRemote.

I think it would be better to control Word throught OLE instead of DDE.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks for your quick response...!!!

Is there any alternate solution or way to implement via DDE only ? because there are lot of ExecRemote commands were written.

As i have mentioned ,while using DDE,the cursor was struck/hang in this line il_handle= OpenChannel('WINWORD', 'SYSTEM') but instead of this line,if i use il_handle=OpenChannel('WINWORD', 'SYSTEM',Send(Handle(w_class), 1,1, 1)) like that,the cursor will move next line code but always value of il_handle= -1 only. - How can i implement this or any sample code please?

If i'll use OLE instead of DDE,how can i use all ExecRemote's functions? if any sample code please...?

Thanks in advance..!!!

0
avatar image
Former Member Jun 02, 2017 at 11:01 AM
0

Thanks for your quick response...!!!

Is there any alternate solution or way to implement via DDE only ? because there are lot of ExecRemote commands were written.

As i have mentioned ,while using DDE,the cursor was struck/hang in this line il_handle= OpenChannel('WINWORD', 'SYSTEM') but instead of this line,if i use il_handle=OpenChannel('WINWORD', 'SYSTEM',Send(Handle(w_class), 1,1, 1)) like that,the cursor will move next line code but always value of il_handle= -1 only. - How can i implement this or any sample code please?

If i'll use OLE instead of DDE,how can i use all ExecRemote's functions? if any sample code please...?

Thanks in advance..!!!

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jun 02, 2017 at 05:15 PM
0

I'm sure that the Microsoft website has plenty of examples on how to control Word via OLE. You should take the initiative to look for the answer yourself. Then if there is a detail you don't understand, come back to the forum with a specific question.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jun 02, 2017 at 08:15 PM
0

Selvaraju,

If you use an oleObject you will not be able to call ExecRemote. Instead you will have to call the proper method for your operation. For eg. if you want to open an instance of MS Word, call ole_1.Activate (OffSite!), to open a document call ole_1.Object.Documents.Open "c:\mydocument.doc".

Check out MSDN https://msdn.microsoft.com/en-us/library/office/ff838565.aspx for a reference of various properties and methods you can call. MSDN examples use VBA but it is quite easy to translate them into powerscript.

Hope this helps.

Share
10 |10000 characters needed characters left characters exceeded