1. John Raghanti
  2. PowerBuilder
  3. Tuesday, 21 January 2020 16:26 PM UTC

Hi again!

Our application allows for an OLE connection to Microsoft Word for mail merges. For all installed versions of Office, including the installed Office365, the call below works as expected.

If iword.ConnectToNewObject("word.application") <> 0 Then

...

However, we have run into a client on Windows 10 who has Office365 preloaded as an app (no detected program installation). The OLE connection fails because the OS doesn't seem to recognize Word on the machine.

Has anyone integrated OLE with the Office365 app?

Thanks!

Peter Allison Accepted Answer Pending Moderation
  1. Wednesday, 3 January 2024 17:05 PM UTC
  2. PowerBuilder
  3. # 1

We have been able to run our code with Office 365 using Word.Application.16.

I've also got mailmerge working and opening based on an MS Word template with no appreciable code changes. The issue we are fighting with now is to save the edited version of the MS Word document. 

Cheers

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Tuesday, 21 January 2020 19:08 PM UTC
  2. PowerBuilder
  3. # 2

Nice intro to MS Graph with lots of sample app code review. https://www.youtube.com/watch?v=3RzdHookpbs

I see MS Graph as Microsoft's new cloud API for Office 365 where all data+APIs reside in the cloud. API seems inspired by ODATA.

HTH /Michael

Comment
  1. Miguel Leeuwe
  2. Wednesday, 22 January 2020 13:42 PM UTC
Yes, nice one.

Too bad that now we are going to have to implement code for 'old' office versions AND office 365 ... :s

  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 21 January 2020 16:51 PM UTC
  2. PowerBuilder
  3. # 3

We have successfully integrated email with Office 365, but ... using the Outlook 2016 client installation of office365.

I think you HAVE to have Outlook 2016 client installed, but I'm not 100% sure, since our system administrator here keeps telling me that that's not the case.

 

You might have to use MS-Graph for your particular setup 

https://docs.microsoft.com/en-us/graph/api/resources/mail-api-overview?view=graph-rest-1.0 and

https://github.com/microsoftgraph/msgraph-training-building-apps/blob/master/Lab.md 

 

or ... maybe "mailkit" could do the job (which would be a nicer solution I think, since it makes you independent of ms office):

https://dotnetcoretutorials.com/2017/01/11/sending-receiving-email-net-core/ and 

https://github.com/jstedfast/MailKit 

 

Comment
  1. Armeen Mazda @Appeon
  2. Tuesday, 21 January 2020 17:55 PM UTC
Web APIs is the way to go. Then you have a solution that can work even if nothing is installed or not correctly installed.
  1. Helpful
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.