Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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'
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
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'
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.