Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro - Open Outlook

Hey Guys,

I'm able to get this working when I have the app open in QV desktop but not on the server. Any ideas why I'm getting this error?

Purpose

Open a message in outlook with to email filled out and subject line filled out.

Error

Macro parse failed: Functionality was lost

openMail

Error: ActiveX component can't create object 'Outlook.Application'

Script/Macro

SUB openMail

vCurrentSheet = ActiveDocument.ActiveSheet.GetProperties.Name
vCurrentApp = ActiveDocument.Name

Set vOutlook = CreateObject("Outlook.Application")
Set vMessage = vOutlook.CreateItem(olMailItem)

vMessage.Subject = "QlikView Email (" & vCurrentApp & ") & Sheet (" & vCurrentSheet &")"
vMessage.To = "kallcorn@us-analytics.com"

vMessage.Display

END SUB

1 Solution

Accepted Solutions
Not applicable
Author

Hey Rob,

Thanks for the note. Outlook wasn't installed on the server hence my problem.

I was able to go a different way since we didn't want to install outlook. On our button I created an open URL action and set the url to

='mailto:kallcorn@us-analytics.com?subject=QV: '&vCurrentApp&' Application/Dashboard Sheet'

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I'm assuming that Outlook is installed and configured on the Server, so it's likely a security settings issue. In the QVS Security settings, you'll need to check "Allow unsafe macro execution on server".

-Rob

Not applicable
Author

Hey Rob,

Thanks for the note. Outlook wasn't installed on the server hence my problem.

I was able to go a different way since we didn't want to install outlook. On our button I created an open URL action and set the url to

='mailto:kallcorn@us-analytics.com?subject=QV: '&vCurrentApp&' Application/Dashboard Sheet'

Not applicable
Author

Hello,

You can also use that for a URL web link within a chart table with the new <URL> property which would auto open default email client.

'CLICK TO EMAIL'&'<URL>mailto:'&your_emailaddress_field

Set representation to LINK.