Jump to content

OutlookEX UDF - Help & Support (IV)


water
 Share

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 comment
Share on other sites

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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
Share on other sites

  • 1 month later...
On 9/19/2022 at 2:34 PM, NolleWed said:

SentOnBehalfOfName does not work: my email-adress is taken instead of ABW-Clearing-D019@telefonica.com
and the whole body is not set (it´s empty)

May I interrupt? Do you really want to use SentOnBehalfOfName? Or do you simply want to send using another email account?

I do not use SentOnBehalfOfName. But I extensively use a second email account to send certain emails.

See this discussion

 

Example I have a personal email address on my computer and a work email. My script must send using work email. This is achieved using 

; Send mail

    ; custom work code added to wrapper --- start
    ;   Local $Dmail_Addy = mtsGetSQL('AccMail_mail')
    ; Search for the account with SMTP mail address "mail.address@company.com"
    ;$accountaddy = '"' & StringStripWS(mtsGetSQL('AccMail_mail'), 8) & '"'
    $accountaddy = StringStripWS(mtsGetSQL('AccMail_mail'), 8)
    ;MsgBox(0, "$accountaddy", "[" & $accountaddy & "]", 1)
    For $oAccount In $oOL.Session.Accounts
        If $oAccount.SMTPAddress = $accountaddy Then
            $oItem.SendUsingAccount = $oAccount
            ExitLoop
        EndIf
    Next
    ; Send the mail from this account
    ; custom work code added to wrapper --- end
    WinActivate("Inbox")
    _OL_ItemSend($oOL, $oItem, Default)
    If @error Then Return SetError(@error + 6000, @extended, 0)
    Return $oItem

Caveat -- the second account must be fully configured in Outlook to work. That is what the For loop session accounts tests for.

😎

Skysnake

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

  • 3 months later...

I need some inspiration.

Mail items are stored in PST files. Typically IMAP also leaves items on the server. This means that server space is being used for data storage.

What I am looking for is ideas on how to handle data storage.

Simple copying of items to offline storage is not sufficient. Items need to be categorized and catalogued. 

Lets say I need to create categories for senders, such as Aunt Jo and uncle Bob, and events, such as Christmas 2020, Lockdown 2020 etc.

Obviously items must be logged to a database on these characteristics, so that when the user clicks on Aunty Jo, all items from her are show, with sub categories.

I can build a SQL database to store, identify and search for items, what I have never done is move data from PST to SQL and restore, and maintain integrity. The primary objective is to reduce "active" PST file sizes, and secondary to be able to search "offline" data storage and then ultimately restore / rebuild the original message(s).

 

What are the issues to take notice of?

Where do I start?

Thank you

Skysnake

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

Why do you want to move files from PST (made for storing mails etc.) to an SQL-database (made to store information as records of  "limited" size? Larger binary objects need to be stored in BLOBs).

The size limitation of 2GB for PSTs has long be lifted and the current "limit" can be raised: https://learn.microsoft.com/en-us/outlook/troubleshoot/data-files/file-size-limits-of-pst-and-ost-files-are-larger

I simply would create a directory hierarchy:

Private Archive       Private Archive
  Aunt Jo               Events 
    Events                Xmas
      Xmas                  2020
        2020                  Aunt Jo
  Uncle Bob                   Uncle Bob
    Events               
      Xmas
        2020

 

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 comment
Share on other sites

Obviously my needs are commercial and more involved than the example posted. I have two problems - the storage space and capacity of the PST files and the ability to catalogue and search. It is important to be able to select a "category tag" and get a list of relevant messages. The data may remain in PST, as long as I can build a searchable database of items. This may require (1) copying from online to offline PST and (2) creating a separate SQL db with PST item IDs only.

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

I am having trouble with saving an attachments that are a bit larger (400kb instead of typical 30-100kb of which i have no problems downloading).  Not sure if the large attachment is the reason.  The attachment is downloaded but only 5kb of it are downloaded.  it's a zip file so the zip file is corrupt and cannot open it.  Im able to download the attachment manually from the same email message and it works (file is 400kb).  Via the script it has only worked a couple of times but mostly it only downloads consistently 5kb.  The file always downloads to the right path ($dest_path) and is named correctly - only 5kb though

The error is not triggered.  I tried removing the option for underscore in case that was causing the issue but that didnt work.  I also put in a sleep before changing the message to unread in case that was causing the issue but that didnt work either.  any thoughts???  thank you in advance!

;~          _OL_ItemAttachmentSave($oOutlook, $aResult[$x][0], Default, 1, $dest_path, 1)
            _OL_ItemAttachmentSave($oOutlook, $aResult[$x][0], Default, 1, $dest_path)

            If @error Then
                MsgBox($msg_error, $script_name, "Unable to save attachment.")
                _Exit()
            EndIf

            Sleep(10000)

            _OL_ItemModify($oOutlook, $aResult[$x][0], Default, "UnRead=False")

 

Edited by gcue
Link to comment
Share on other sites

Never heard of such a problem. Could you please call _OL_ErrorNotify before saving the attachment?

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 comment
Share on other sites

hi water.  

i added            

_OL_ErrorNotify(4)

before            

_OL_ItemAttachmentSave($oOutlook, $aResult[$x][0], Default, 1, $dest_path, 1)

i did not get any errors.  file still only downloading 5kb. please let me know if you have any other ideas.. im at a loss

Link to comment
Share on other sites

going to try different attachment types as well as sizes to see if i can get more info... will report back.

in case you think of anything else please let me knw in the interim :)

Thank you!

Link to comment
Share on other sites

very strange....

i tried to create other emails to replicate the issue.

- tried to create an email with a larger zip file (1.5MB instead of 400kb) with multiple files - no issues (tried multiple times)
- the zip file attachment in question has 3 folders in it with long folder names + long file names -- tried to create these conditions in a new zip file - no issues
- i unzipped and re-zipped the file in question and unable to replicate the issue with the new email msg with that attachment.

the vendor who sent me the original message will be sending me an email every friday so will see if the issue occurs again with tomorrows email

hopefully just a one off - will report back in case i see any other findings 

Link to comment
Share on other sites

very strange.  only files from this vendor pose the problem.  i will ask the vendor how they are zipping the files.  but whats strange is i could manually download the file and unzip it with winzip or windows unzip successfully every time.

Link to comment
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
 Share

×
×
  • Create New...