Jump to content
water

OutlookEX UDF - Help & Support (III)

Recommended Posts

hello all,

is it possible using the OutlookEX UDF, to store in an array the items properties like its body, subject, attachments. Basically everything about that mail item and transfer that to another autoit script running on another computer with outlook so as to make an exact copy of that mail item(sync) between two outlook?

If yes does any of you have examples/materials i can look upon?

other solutions doing that sync type of outlook(s) are not compatible with unicode messages or open source solutions are heavily coded/feature bloated so just started thinking in doing it with autoit.

tried to read all of the OutlookEX UDF functions until my mind totaly blocked.

I looked upon the ItemExport, ItemImport, ItemSave functions but I cant figure out how to convert the object to an array

so to transfer it through tcpsend. One other possible solution I also looked upon was that I could save to a temp PST file all the items that I want and just transfer that file to the computer with the outlook that needs to be sync'ed.

If anyone has any ideas how this can be made possible please tell me so.

thanks in advance for your help!

Simon

Share this post


Link to post
Share on other sites

Are you talking about a one time sync of selected mail items or do you need a continous sync of the two Outlook instances?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

sorry for the delay, propably the continuous sync that is when I press the sync or whatever button at the end of the day I want some of my outlook instances here at my work to be in sync and those 2-3 computers with outlook have exact same inbox/sent mails. What's missing from me is a way to import the .MSG unicode files(email + attachments) or a way to transfer the object vItem that is in ItemCopy function to another computer through networking. The rest I can glue them together. ^_^

Share this post


Link to post
Share on other sites

I can imagine to have a PST file on a network share and copy the needed items to this archive. Or do you need to write to this PST file from any of your computers?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

If I do it with a PST file then I guess I'll share the PST file on my server and then i'll access it from each autoit script each time I need to make the sync between them. 1 primary instance of outlook will make changes on any emails and copy them to PST file and then the rest instances will make copies OR replacements of those mailitems in need. okay figure it out. thanks for the help water!

Share this post


Link to post
Share on other sites

I have never tested if a PST file can be opened by more than one instance at a time. Maybe you run into file locking issues.

Then we need to think about other solutions. Maybe Exchange Mailbox sharing?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I've had a look at the OutlookEX udf but cannot understand much as I'm not so proficient in programming, but I hope I'm in the right place for this.

What I basically need is AutoIt to constantly monitor and automatically read every incoming email and search in the email body for a specific string. Perhaps reading the whole email body and put it into a variable? Similar to what something like $var = _INetGetSource() can do perhaps. Then I can do StringInStr on this variable?

Share this post


Link to post
Share on other sites

This means you have to handle events.

I'm on vacation right now so I can't tell you any details.

The UDF comes with some examples handling events. You can find them in the examples thread. For the link please check my signature.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Water,

do you have any idea why my recall function is always failed?

Subject:    Recall: test

      Sent: 22-Jun-14 8:16 AM

cannot be recalled on 22-Jun-14 8:16 AM.

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites

Do you recall manually or by script?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Does Outlook connect to an Exchange server?

Did recalling ever work before?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I dont know about the exchange server, but i think yes because we are using company email, POP/SMTP.

Recall function, worked once for 1 email add(outlook) only, but sent it to 10 email add(outlook). and tried to recall to the same email that worked before and it failed, again and again..


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites

I only used recall a few times. Sometimes it worked, sometimes it didn't.

I can't tell if this is expected behavior or not.

More error information would be required.

Right now I'm on vacation but will have a look next week.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

hi water, thanks for the awesome UDF! Just wondering if there is any fix for the _OL_ItemRecipientAdd $iType bug? I'm trying to add CC recipients but its not working....

Share this post


Link to post
Share on other sites

Here is the fixed function. Simply replace the function in the UDF:

Func _OL_ItemRecipientAdd($oOL, $vItem, $sStoreID, $iType, $vP1, $vP2 = "", $vP3 = "", $vP4 = "", $vP5 = "", $vP6 = "", $vP7 = "", $vP8 = "", $vP9 = "", $vP10 = "", $bAllowUnresolved = True)

    Local $oRecipient, $aRecipients[10], $oTempRecipient
    If Not IsNumber($iType) Then Return SetError(5, 0, 0)
    If Not IsObj($vItem) Then
        If StringStripWS($vItem, 3) = "" Then Return SetError(1, 0, 0)
        $vItem = $oOL.Session.GetItemFromID($vItem, $sStoreID)
        If @error Then Return SetError(2, @error, 0)
    EndIf
    ; Move members into an array
    If Not IsArray($vP1) Then
        $aRecipients[0] = $vP1
        $aRecipients[1] = $vP2
        $aRecipients[2] = $vP3
        $aRecipients[3] = $vP4
        $aRecipients[4] = $vP5
        $aRecipients[5] = $vP6
        $aRecipients[6] = $vP7
        $aRecipients[7] = $vP8
        $aRecipients[8] = $vP9
        $aRecipients[9] = $vP10
    Else
        $aRecipients = $vP1
    EndIf
    ; add recipients to the item
    #forceref $oTempRecipient ; to prevent the AU3Check warning: $oTempRecipient: declared, but not used in func.
    For $iIndex = 0 To UBound($aRecipients) - 1
        ; recipient is an object = recipient name already resolved
        If IsObj($aRecipients[$iIndex]) Then
            $oTempRecipient = $vItem.Recipients.Add($aRecipients[$iIndex])
            If @error Then Return SetError(3, $iIndex, 0)
            $oTempRecipient.Type = $iType
        Else
            If StringStripWS($aRecipients[$iIndex], 3) = "" Then ContinueLoop
            $oRecipient = $oOL.Session.CreateRecipient($aRecipients[$iIndex])
            If @error Or Not IsObj($oRecipient) Then Return SetError(600 + $iIndex, @error, 0)
            $oRecipient.Resolve
            If @error Or Not $oRecipient.Resolved Then
                If Not (StringInStr($aRecipients[$iIndex], "@")) Or Not ($bAllowUnresolved) Then Return SetError(400 + $iIndex, @error, 0)
            EndIf
            $oTempRecipient = $vItem.Recipients.Add($oRecipient)
            If @error Then Return SetError(300 + $iIndex, @error, 0)
            $oTempRecipient.Type = $iType
        EndIf
    Next
    $vItem.Save()
    Return $vItem

EndFunc ;==>_OL_ItemRecipientAdd
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

hmm, thanks water, but that doesnt seem to work :(... the cc recipients still go into the To: field.

EDIT: seems that this only happens if you add To: recipients first and the Cc recipients.  If you add Cc recipients first then To recipients it appears to work properly!

Edited by mpower

Share this post


Link to post
Share on other sites

Can you please post the code you run?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • By water
      Extensive library to control and manipulate Microsoft Outlook.
      Theads: Development - General Help & Support - Example Scripts - Wiki
      There is another UDF (OutlookTools) available (as a beta at the moment) to import/export contacts and events to VCF/ICS files.
      BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort

      KNOWN BUGS (last changed: 2019-11-30)
      None
    • By Stormgrade
      Hello,
      I'm searching the UDF GDIpProgress.au3 from ProgAndy
      None of the links in topic
       works
      Can't someone upload it please ?
    • By water
      I just noticed that Outlook does not allow to import iCal events programmatically.
      I might implement some of the iCalendar data format (RFC 5545) if someone is interested
      Please post here or click the "Like" button if you think this is a good idea
      Edit: For download please see my signature
    • By ozymandius257
      This is probably a very simple question (I hope!)
      I'm looking to use a UDF to access a SQL database, and have found ADO.au3, but I can't seem to work out how to use it.
      I've copied the files ado.au3 and ado_constants.au3 into the folder C:\Program Files (x86)\AutoIt3\Include, then opened SciTe and started a new project.
      But when I type #include<AD - I don't get offered ADO.au3.
      (I know I should be using the folder C:\Program Files (x86)\AutoIt3\UserInclude, but when it didn't work from there, I tried the above).
      What am I doing wrong?
       
    • By BetaLeaf
      What is Rollbar?
      Rollbar provides real-time error alerting & debugging tools for developers. Learn more about it at https://rollbar.com/product/
      Demo: https://rollbar.com/demo/demo/
      Screenshot:
      Instructions: (RollbarTest.au3)
      ; Include RollbarSDK #include "RollbarSDK.au3" ;Turns on ConsoleWrite debugging override. ;Global $Rollbar_Debug=False ; Initialize RollbarSDK with the project's API key. ; Parameters ....: $__Rollbar_sToken - [Required] Go to https://rollbar.com/<User>/<ProjectName>/settings/access_tokens/ for your project. Use the token for post_server_item. _Rollbar_Init("eaa8464a4082eeabd9454465b8f0c0af") ; Write code that causes an error you want to catch, then call ; _Rollbar_Send ; Parameters ....: $__Rollbar_sErrorLevel - [Required] Must be one of the following values: Debug, Info, Warning, Error, Critical. ; $__Rollbar_sMessage - [Required] The message to be sent. This should contain any useful debugging info that will help you debug. ; $__Rollbar_sMessageSummary - [Optional] A string that will be used as the title of the Item occurrences will be grouped into. Max length 255 characters. If omitted, Rollbar will determine this on the backend. _Rollbar_Send("Debug", "This is an debug message. If you received this, you were successful!", "Debug Message") _Rollbar_Send("Info", "This is a test message. If you received this, you were successful!", "Info Message") _Rollbar_Send("Warning", "This is an warning message. If you received this, you were successful!", "Warning Message") _Rollbar_Send("Error", "This is an error message. If you received this, you were successful!", "Error Message") _Rollbar_Send("Critical", "This is an critical message. If you received this, you were successful!", "Critical Message") _Rollbar_Send("Info", "This is a test message. If you received this, you were successful!") ;No Message ; Rollbar_Send's helper functions ; Parameters ....: $__Rollbar_sMessage - [Required] The message to be sent. This should contain any useful debugging info that will help you debug. ; $__Rollbar_sMessageSummary - [Optional] A string that will be used as the title of the Item occurrences will be grouped into. Max length 255 characters. If omitted, Rollbar will determine this on the backend. _Rollbar_SendDebug("This is an debug message. If you received this, you were successful!", "Debug Message") _Rollbar_SendInfo("This is a test message. If you received this, you were successful!", "Info Message") _Rollbar_SendWarning("This is an warning message. If you received this, you were successful!", "Warning Message") _Rollbar_SendError("This is an error message. If you received this, you were successful!", "Error Message") _Rollbar_SendCritical("This is an critical message. If you received this, you were successful!", "Critical Message") ; Usable Example Local $sImportantFile = "C:\NOTAREALFILE_1234554321.txt" Switch FileExists($sImportantFile) Case True MsgBox(0, "Example Script", "An important file was found. Continuing...") Case Else _Rollbar_SendCritical('An important file was missing. Halting... File: "' & $sImportantFile & '"', 'Important file "' & $sImportantFile & '" is missing.') EndSwitch Notes: Please comment your feedback, advice, & suggestions below. While this is only a proof of concept, I will expand its feature set for everyone to use. 
      Right now, it is fully functional but not tested in production.
       
       
      Changelog:
      RollbarSDK.au3
      RollbarTest.au3
      v0.2
       
      v0.1.1
       
×
×
  • Create New...