1. Peter Allison
  2. PowerBuilder
  3. Monday, 8 January 2024 13:55 PM UTC

Greetings,

As more and more developers experience issues converting their OLE code from MS Word 2019 to Office 365, are there any refactoring constants or hints that we can look out for?

Specifically, I am unable to save changes made to the MS Word document in the OLE control to a new document in Office 365 (Word.Application.16) i.e. <ole control>.object.Application.ActiveDocument.saveas(as_file_name)

I don't have time to rebuild the Word interface in our application, so my only hope is the refactoring of the OLE code route. Any code examples that you could provide would be very helpful. Thanks in advance for your assistance.

Thanks

Peter Allison Accepted Answer Pending Moderation
  1. Wednesday, 10 January 2024 16:51 PM UTC
  2. PowerBuilder
  3. # 1

Chris,

Does the refactoring effort depend on Powerbuilder 2022 or can I still use Powerbuilder 2019 R3? 

Thanks,

Peter

Comment
  1. John Fauss
  2. Wednesday, 10 January 2024 18:46 PM UTC
Hi, Peter - The changes that Chris refers to are in the MS Office Document Object Model (DOM), not in PB. There may be new or changed Office objects, methods and constants. Since the underlying interfacing technology in Windows (COM/COM+) has NOT changed, any version of PB used prior to the DOM changes should continue to interface with Office products.
  1. Helpful 2
  1. Peter Allison
  2. Wednesday, 10 January 2024 19:05 PM UTC
Understood. I have successfully changed a couple of SaveAs() to Save() object method calls, and it now seems to be working as expected. Thanks.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 10 January 2024 19:46 PM UTC
Excellent .. that is great news Peter! :-)
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 8 January 2024 14:33 PM UTC
  2. PowerBuilder
  3. # 2

Hi Peter;

  The DOM model changes slightly in Office 365 vs earlier versions of MS-Office. These changes usually only affect the odd structure / method signature. So, you'll need to tweak your OLE.Object code to comply.

FYI:  https://learn.microsoft.com/en-us/visualstudio/vsto/word-object-model-overview?view=vs-2022&tabs=csharp

HTH

Regards ... Chris 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.