javascript - ActiveXObject("Outlook.Application") Not working when Outlook is open -
i have javascript works when outlook closed. however, if outlook open receive "automation server" error.
var outlookapp = new activexobject('outlook.application'); var namespace = outlookapp.getnamespace("mapi"); mailfolder = namespace.getdefaultfolder(6); email = mailfolder.items.add('ipm.note.forma'); email.subject="quote: "+ quotenum + ' | part#: '+ partnum; email.to = "lcarreiro@epectec.com"; //who going email.htmlbody = "quote attached " + quotenum; email.display(0); any suggestions besides changing ie setting have done so....
probably little late helps else ends here.
i having same issue , stumbled across https://stackoverflow.com/a/3779945/1002621 answered similar question.
basically issue because when run visual studio administrator , outlook normal privileges no longer allowed instance existing outlook application single instance won't create new one.
this issue if initiate debugging directly visual studio starting own instance of ie makes problem go away.
Comments
Post a Comment