1. Rory O'Neill
  2. PowerBuilder
  3. Wednesday, 10 April 2024 16:15 PM UTC

I'm using a OLE Object to connect to  Word:

OLEObject contact_ltr
contact_ltr = CREATE OLEObject
li_result = contact_ltr.ConnectToNewObject("Word.application")

Then I replace bookmarks one of which need to be a mailto link. How do I this? So, far I'm only able to get the email address to display in the document as text not a link.

John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 10 April 2024 18:10 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Rory -

Although I have never coded this specific task, from looking at the Word Object Model online documentation, I believe you should be able to create a "mailto" hyperlink by utilizing the Add method of the Hyperlinks collection via OLE.

    https://learn.microsoft.com/en-us/office/vba/api/word.hyperlinks.add

A "mailto" URL uses the format mailto:name@company.com

Best regards, John

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.