Jump to content

OutlookEX UDF - Help & Support (IV)


Recommended Posts

On 9/23/2022 at 10:41 PM, water said:

That's about TNEF. This has nothing to do with your problem.


When searching the web for the 0x80004004 error code I got a few ideas:

  • Do you run the 64 bit version of Office? If yes, please run the script as 64 bit as well.
  • Can you please deactivate all Outlook addons and run your script again?
  • Can you hava a look at this site and check the "Programmatic Access Security".
  • Another post to check. The same error has already been discussed in 2019.
  • I check the version in outlook and found thisimage.png.13f94a834f3613fc8a74b1780719c6ab.png So I think its 32 Bit Version.

 

  • I can´t deactivate all Add-Ons, because one is set by System Administrator :( (it´s a PC at work, not my private one)

 

  • "Programmatic Access Security" is valid

image.png.9faddf30346cb4cdd7f148c9d21415b4.png

 

  • I do not get the solution for the last point

Do I have to take another UDF for Outlook365 instead of OutlookEX.au3? Which one (link)?

or

Do I have to change the policies in regedit that OutlookEX.au3 works? Which parameter I have to change?

image.png

Link to post
Share on other sites
  • Replies 569
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Fixed in version 1.3.3.1 of the UDF I uploaded today

I've done something like this before, and if I remember correctly, the sent email object is no longer valid after it has been sent. To solve it, I searched the sent email folder for the subject of the

Version 1.7.0.0 of the UDF has been released. Now you get a help file that looks like the AutoIt help. Please test before using in production! For download please see my signature.

Posted Images

We run "Microsoft Outlook 2016 MSO 32-Bit" on Windows 10.
My understanding is that "Microsoft 365 Apps for Enterprise" is the Client for the cloud version of MS Office. 

Quote
  • I do not get the solution for the last point

Means that you should ask your IT-department. Maybe they have done some of the described settings (in the post I linked you to and the posts that follow).

I have really run out of ideas what could cause your problems :( 
Your script works on your W8 PC, doesn't on your W10 machine and works on my W10 computer. So I think the problem is related to your Outlook version or some of the configuration settings.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites
12 hours ago, water said:

We run "Microsoft Outlook 2016 MSO 32-Bit" on Windows 10.
My understanding is that "Microsoft 365 Apps for Enterprise" is the Client for the cloud version of MS Office. 

The Office Version for all Office products is "Microsoft 365 Apps for Enterprise", but the App on the PC is Outlook 2016. I search the path of the App and get this: C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE

Link to post
Share on other sites
12 hours ago, water said:

Means that you should ask your IT-department. Maybe they have done some of the described settings (in the post I linked you to and the posts that follow).

I have really run out of ideas what could cause your problems :( 
Your script works on your W8 PC, doesn't on your W10 machine and works on my W10 computer. So I think the problem is related to your Outlook version or some of the configuration settings.

In the post September 29, 2019 from Simpel he/she asks "Which of the policies should be set to 2 to get the following work?" I can´t see any answer in the following post. These are my settings in the regestry:

 image.png.f4a4f493e28669cc028b603e2a7f0283.png

Link to post
Share on other sites

I have absolutely run out of ideas :(

Did you ask your IT department what has changed between Outlook 2013 and Outlook 2016?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites
  • 3 weeks later...

Hello,

 

I did a little search but this seems to be a new topic, and I can't find any reference in the help file neither.

When using this function from version 1.7.0.1 :

_OL_Wrapper_SendMail($oOL, $useremail, $ccemail & ";" & $additionalemail, "noreply@xx.xx;" , $emailTopic, $emailbody , "", $olFormatHTML, $olImportanceHigh)

And the HTML body contains a Sharepoint Online link like this one :

https://14560218.sharepoint.com/sites/TEST-General/Shared Documents/Forms/welcome.aspx

 

When sending the email, we got this warning :

 

image.png.2320466f5c3aebbb01a1c033a7c567ee.png 
 

I know this is an actual and legitimate warning from Outlook, but is it possible to include a switch to choose between "Send Anyway" and "Don't Send" without user interaction?

Thanks

 

Link to post
Share on other sites

Will reply after my vacation. 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

You could have a look at _OL_Open.
Parameters $bWarningClick, $sWarningProgram, $iWinCheckTime and $iCtrlCheckTime allow to call a program to click away such messages.
The UDF comes with an example script (_OL_Warnings) which you can extend to suit your needs

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites
  • 3 weeks later...

Greetings,

I am trying to take emails sitting in my outbox (from MailMerge) and apply High Importance to them before they are sent.

I thought I could get it to work with something like:

_OL_ItemModify($Outlook_Connection, $Email_In_Focus, Default, $iImportance=$olImportanceHigh)

But, this strategy does not appear to work.

Any recommendations on how to apply High Importance to an email in my outbox?

_____________________________________________________________________________________________________________________

Edit: I fixed it with:

_OL_ItemModify($Outlook_Connection, $Email_In_Focus, Default, "Importance=" & $olImportanceHigh)

 

Edited by baconaise
I fixed it.
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Cyborg5000
      Can some one please point me why i keep getting the error while the script is in loop:-
      "C:\Program Files (x86)\AutoIt3\Include\OutlookEX.au3" (2443) : ==> Subscript used on non-accessible variable.:
      If Not (IsNumber($iAttachment)) Or $iAttachment < 1 Or $iAttachment > $aAttachments[0][0] Then Return SetError(8, $aAttachments[0][0], 0)
      If Not (IsNumber($iAttachment)) Or $iAttachment < 1 Or $iAttachment > $aAttachments^ ERROR
      My code as below though copied and modified as per need, to get attachments, and other details.
      #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <File.au3> #include <IE.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <StringConstants.au3> #include <FileConstants.au3> #include <Array.au3> #include <String.au3> #include <UIAWrappers.au3> #include <GuiEdit.au3> #include <Clipboard.au3> #include <WinAPI.au3> #include <ColorConstants.au3> #include <FontConstants.au3> #include <ProgressConstants.au3> #include <Restart.au3> #include <_IEquerySelectorAll.au3> #include <GuiRichEdit.au3> #include <hiddenDesktopInteract.au3> #include <Date.au3> #include <CUIAutomation2.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <OutlookEX.au3> #include <Misc.au3> #include <MsgBoxConstants.au3> ;Global $oErrorHandler = ObjEvent("Autoit.Error", "ComErrorHandler") FileDelete("D:\attachment\*.*") FileDelete("D:\Email-Details\*.*") FileDelete("D:\Script-temp\*.*") FileDelete("D:\Downloaded-Cert\*.*") FileDelete("D:\LOG\*.*") RunWait("taskkill /F /IM iexplore.exe /T", "", @SW_HIDE) ;Global $Errorcomments ;If Not IsDeclared($Errorcomments) Then Global $Errorcomments ; ***************************************************************************** ; Example Script ; Handle Outlook NewmailEX event when a new mail arrives. ; This script loops until Shift-Alt-E is pressed to exit. ; ***************************************************************************** HotKeySet("+!e", "_Exit") ;Shift-Alt-E to Exit the script ;MsgBox(64, "OutlookEX UDF Example Script", "Hotkey to exit the script: 'Shift-Alt-E'!") Global $oOApp = ObjCreate("Outlook.Application") Global $test = ObjEvent($oOApp, "oOApp_") While 1     Sleep(400) WEnd FileDelete("D:\attachment\*.*") FileDelete("D:\Email-Details\*.*") FileDelete("D:\Script-temp\*.*") FileDelete("D:\Downloaded-Cert\*.*") FileDelete("D:\LOG\*.*") RunWait("taskkill /F /IM iexplore.exe /T", "", @SW_HIDE) ; Outlook 2007 - NewMailEx event - http://msdn.microsoft.com/en-us/library/bb147646%28v=office.12%29.aspx Func oOApp_NewMailEx($sOL_EntryId)     FileDelete("D:\attachment\*.*")     FileDelete("D:\Email-Details\*.*")     FileDelete("D:\Script-temp\*.*")     FileDelete("D:\Downloaded-Cert\*.*")     FileDelete("D:\LOG\*.*")     RunWait("taskkill /F /IM iexplore.exe /T", "", @SW_HIDE)     Sleep(1000)     Local $oOL_Item = $oOApp.Session.GetItemFromID($sOL_EntryId, Default)     Sleep(1000)     _OL_ItemAttachmentSave($oOApp, $oOL_Item, Default, 1, "D:\attachment\")     Sleep(1000)     ;MsgBox(64, "OutlookEX UDF Example Script", "New mail has arrived!" & @CRLF & @CRLF & _     ;"From:    " & $oOL_Item.SenderName & @CRLF & _     ;"Subject: " & $oOL_Item.Subject)     Local $oOL_Item1 = $oOApp.Session.GetItemFromID($sOL_EntryId, Default)     Sleep(1000)     Local $oOL_Sender = $oOL_Item1.Sender     If $oOL_Sender.AddressEntryUserType = $olExchangeUserAddressEntry Or $oOL_Sender.AddressEntryUserType = $olExchangeRemoteUserAddressEntry Then         Local $oExchangeUser = $oOL_Sender.GetExchangeUser     Else         Sleep(2000)     EndIf     Sleep(1000)     Local $sendername = ("D:\Email-Details\sendername.txt")     Local $Subject = ("D:\Email-Details\subject.txt")     ;=================================Subjectfile file write ===========================================     Local $Subject1 = FileOpen($Subject, $FO_APPEND)     If $Subject1 = -1 Then         MsgBox($MB_SYSTEMMODAL, "", "An error occurred whilst writing the Subject file.")         Return False     EndIf     ; Write data to the file using the handle returned by FileOpen.     FileWrite($Subject1, $oOL_Item1.Subject)     ; Close the handle returned by FileOpen.     FileClose($Subject1)     Sleep(1000) ;=================================End sendername file write ===========================================     $Filerunpath = ("C:\Users\certauto\Desktop\Test.Exe")     Local $iPID = Run($Filerunpath)     ProcessWaitClose($iPID)     Sleep(1000)     _OL_ItemModify($oOApp, $oOL_Item, Default, "Unread=False")     ;$openemail = WinActivate ( "[CLASS:NetUIHWND; INSTANCE:1]", "" )     ;ControlClick($openemail, "", "NUIDialog")     ;$oOApp.Session.Logoff     Sleep(1000)     ;====================Mark email as read===========================================     ;_OL_ItemModify($oOL_Item,$oOApp.Session.GetItemFromID($sOL_EntryId, Default, "Unread=False")     Sleep(1000) EndFunc   ;==>oOApp_NewMailEx Func _Exit()     Exit EndFunc   ;==>_Exit
    • By Skysnake
      This assumes implementation of the OutlookEX UDF.
      I have PSTs which are becoming unmanageable 
      The idea is to make a simple GUI (Listview) which can combine non-Outlook data and include emails based on criteria.  Manage them in the GUI (delete / reply etc) and update to Outlook.
      So the issue would be to manage the items in the GUI while using the PST as a database.
      Ideas on how to do this? What would the key be?
    • By Reizvoller
      Howdy!
      I've been reading through the OutLookEX documentation and examples for the past two days ( VERY well documented, very clear! ) 
      https://www.autoitscript.com/wiki/OutlookEX_UDF_-_General
       
      But I've had trouble locating information on specifying what user to use. My outlook is linked to two email accounts and I can only manipulate the main account's stuff. A simple script I've been playing with is this 
      ; Include Functions #include <OutlookEX.au3> ; Connect to Outlook Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "Connect to Outlook", "Error connecting to Outlook. @error = " & @error & ", @extended = " & @extended) ;List the folders Global $aResult = _OL_FolderTree($oOutlook, "*") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_FolderTree Example Script", "Error accessing root folder. @error = " & @error) _ArrayDisplay($aResult, "OutlookEX UDF: _OL_FolderTree Example Script - All folders") It works like a charm but it only returns my main account's folders. 
      I really hope I didn't overlook a wiki page or help file... 
      Any assistance would be greatly appreciated!
      -Reiz
    • By galan2015
      Is there any solution on receiving e-mails? I would like to create a script so that I will not have to log in through the browser.
×
×
  • Create New...