1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. water

Beiträge von water

  • Outlook UDF nicht vorhandene User Filtern

    • water
    • 27. September 2014 um 11:20

    Muss ich am Montag mal checken.

  • Aktuelles AutoIt hat andere Excel-Funktionen

    • water
    • 27. September 2014 um 10:43

    Welche Laus ist denn Dir über die Leber gelaufen?
    Hier hat keiner was von Kaugummi klauen oder Vergewaltigung gesagt. Blas das Thema also nicht größer auf als es ist!
    Und ich verwahre mich strikt dagegen, dass Du mir gesetzwidrige Dinge in den Mund legst!
    Wenn Du solche Probleme mit den Aussagen eines Posters hast, dann regele das bitte per PN!

  • Aktuelles AutoIt hat andere Excel-Funktionen

    • water
    • 26. September 2014 um 07:47

    Nach der Länge der Antwort zu schließen haben wir da einen wunden Punkt bei Dir getroffen?
    Ein einfaches "Nein" hätte vermutlich genügt?

  • Aktuelles AutoIt hat andere Excel-Funktionen

    • water
    • 25. September 2014 um 22:05

    Wow. Seien wir froh, dass Jon das damals nicht auch so gesehen hat.

  • Aus Excel abgeleitet Dateistrukturen anlegen....

    • water
    • 25. September 2014 um 15:31

    Wenn's Fragen zur Excel UDF gibt, einfach hier oder in jedem beliebigen Thread mit "Excel" im Titel posten.
    Als Autor der UDFs werde ich versuchen alle Fragen zu beantworten.

  • Outlook UDF nicht vorhandene User Filtern

    • water
    • 25. September 2014 um 14:15

    Andere alternative:
    Ich habe _OL_ItemRecipientCheck so angepasst, dass es einen Array zurückggibt, der nur die gültigen Adressen beinhaltet und direkt an _OL_ItemRecipientAddweitergegeben werden kann.
    Beispiel:

    Spoiler anzeigen
    [autoit]

    #include <OutlookEx.au3>
    Global $oOL = _OL_Open()

    [/autoit] [autoit][/autoit] [autoit]

    Global $aResult = _OL_ItemRecipientCheckEx($oOL, "<< Hier gültigen Empfänger eingeben >>", "", "", "", "", "", "", "", "", "", True)
    Global $oItem = _OL_ItemCreate($oOL, $olMailItem, "*", "", "Subject=Test", "BodyFormat=" & $olFormatHTML, "HTMLBody=TestBody")
    _OL_ItemRecipientAdd($oOL, $oItem, Default, $olTo, $aResult)
    $oItem.Display
    _OL_Close($oOL)
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name ..........: _OL_ItemRecipientCheck
    ; Description ...: Checks one/more recipients to be valid.
    ; Syntax.........: _OL_ItemRecipientCheck($oOL, $sP1[, $sP2 = ""[, $sP3 = ""[, $sP4 = ""[, $sP5 = ""[, $sP6 = ""[, $sP7 = ""[, $sP8 = ""[, $sP9 = ""[, $sP10 = ""[, $bOnlyValid = False]]]]]]]]]])
    ; Parameters ....: $oOL - Outlook object returned by a preceding call to _OL_Open()
    ; $sP1 - Name, Alias or SMTP mail address of one or multiple recipients separated by ";" ($sP2 to $sP10 are ignored if ";" is used)
    ; +or a zero based one-dimensional array with unlimited number of recipients
    ; $sP2 - Optional: Name, Alias or SMTP mail address of a single recipient (no concatenation of recipients using ";" allowed)
    ; $sP3 - Optional: Same as $sP2
    ; $sP4 - Optional: Same as $sP2
    ; $sP5 - Optional: Same as $sP2
    ; $sP6 - Optional: Same as $sP2
    ; $sP7 - Optional: Same as $sP2
    ; $sP8 - Optional: Same as $sP2
    ; $sP9 - Optional: Same as $sP2
    ; $sP10 - Optional: Same as $sP2
    ; $bOnlyValid - Optional: Only return the resolved recipients objects in a one-dimensional zero based array (default = False)
    ; Return values .: Success - two-dimensional one based array with the following information (for $bOnlyValid = False):
    ; |0 - Recipient derived from the list of recipients in $sP1
    ; |1 - True if the recipient could be resolved successfully
    ; |2 - Recipient object as returned by the Resolve method
    ; |3 - AddressEntry object
    ; |4 - Recipients mail address (empty for distribution lists). This can be:
    ; | PrimarySmtpAddress for an Exchange User
    ; | Email1Address for an Outlook contact
    ; | Empty for Exchange or Outlook distribution lists
    ; |5 - Display type is one of the OlDisplayType enumeration that describes the nature of the recipient
    ; |6 - Display name of the recipient
    ; Success - one-dimensional zero based array with the following information (for $bOnlyValid = True):
    ; |0 - Recipient object which was successfully resolved by the Resolve method. Unresolveable recipients are not aprt of the result!
    ; Failure - Returns "" and sets @error:
    ; |1 - $oOL is not an object
    ; |2 - $sP1 is empty
    ; |3 - Error creating recipient object. @extended contains the error returned by method CreateRecipient
    ; Author ........: water
    ; Modified ......:
    ; Remarks .......: When $bOnlyValid = True you get a one-dimensional zero based array with all invalid recipients removed.
    ; This array can easily be passed to _OL_ItemRecipientAdd.
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ; ===============================================================================================================================
    Func _OL_ItemRecipientCheckEx($oOL, $sP1, $sP2 = "", $sP3 = "", $sP4 = "", $sP5 = "", $sP6 = "", $sP7 = "", $sP8 = "", $sP9 = "", $sP10 = "", $bOnlyValid = False)

    [/autoit] [autoit][/autoit] [autoit]

    Local $oRecipient, $asRecipients[10]
    If Not IsObj($oOL) Then Return SetError(1, 0, "")
    If StringStripWS($sP1, 3) = "" Then Return SetError(2, 0, "")
    ; Move recipients into an array
    If Not IsArray($sP1) Then
    If StringInStr($sP1, ";") > 0 Then
    $asRecipients = StringSplit($sP1, ";", 2)
    Else
    $asRecipients[0] = $sP1
    $asRecipients[1] = $sP2
    $asRecipients[2] = $sP3
    $asRecipients[3] = $sP4
    $asRecipients[4] = $sP5
    $asRecipients[5] = $sP6
    $asRecipients[6] = $sP7
    $asRecipients[7] = $sP8
    $asRecipients[8] = $sP9
    $asRecipients[9] = $sP10
    EndIf
    Else
    $asRecipients = $sP1
    EndIf
    If $bOnlyValid Then
    Local $asResult[UBound($asRecipients, 1)]
    Local $iIndex2 = 0
    Else
    Local $asResult[UBound($asRecipients, 1) + 1][7] = [[UBound($asRecipients, 1), 7]]
    Local $iIndex2 = 1
    EndIf
    For $iIndex = 0 To UBound($asRecipients, 1) - 1
    If StringStripWS($asRecipients[$iIndex], 3) = "" Then ContinueLoop
    If Not $bOnlyValid Then $asResult[$iIndex2][0] = $asRecipients[$iIndex]
    $oRecipient = $oOL.Session.CreateRecipient($asRecipients[$iIndex])
    If @error Or Not IsObj($oRecipient) Then Return SetError(3, @error, "")
    $oRecipient.Resolve
    If @error Or Not $oRecipient.Resolved Then
    If $bOnlyValid Then ContinueLoop
    $asResult[$iIndex2][1] = False
    Else
    If $bOnlyValid Then
    $asResult[$iIndex2] = $oRecipient
    Else
    $asResult[$iIndex2][1] = True
    $asResult[$iIndex2][2] = $oRecipient
    Switch $oRecipient.AddressEntry.AddressEntryUserType
    ; Exchange user that belongs to the same or a different Exchange forest
    Case $olExchangeUserAddressEntry, $olExchangeRemoteUserAddressEntry
    $asResult[$iIndex2][3] = $oRecipient.AddressEntry.GetExchangeUser
    $asResult[$iIndex2][4] = $oRecipient.AddressEntry.GetExchangeUser.PrimarySmtpAddress
    ; Address entry in an Outlook Contacts folder
    Case $olOutlookContactAddressEntry
    $asResult[$iIndex2][3] = $oRecipient.AddressEntry.GetContact
    $asResult[$iIndex2][4] = $oRecipient.AddressEntry.GetContact.Email1Address
    ; Address entry in an Exchange Distribution list
    Case $olExchangeDistributionListAddressEntry
    $asResult[$iIndex2][3] = $oRecipient.AddressEntry.GetExchangeDistributionList
    ; Address entry in an an Outlook distribution list
    Case $olOutlookDistributionListAddressEntry
    $asResult[$iIndex2][3] = $oRecipient.AddressEntry
    Case Else
    EndSwitch
    $asResult[$iIndex2][5] = $oRecipient.DisplayType
    $asResult[$iIndex2][6] = $oRecipient.Name
    EndIf
    EndIf
    $iIndex2 = $iIndex2 + 1
    Next
    If $bOnlyValid Then ReDim $asResult[$iIndex2]
    Return $asResult

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_OL_ItemRecipientCheckEx

    [/autoit]
  • Outlook UDF nicht vorhandene User Filtern

    • water
    • 25. September 2014 um 12:35

    Hier ein funktionierendes Beispiel. "John Doe" musst Du noch durch einen gültigen Namen ersetzen. Einige zeilen habe ich auskommentiert oder den für den Test nicht verwendbaren Teil nach rechts in einen Kommentar verschoben.

    [autoit]

    #include <OutlookEx.au3>
    Global $pcc = "", $Betreff = "TestBetreff", $textfeld = "TestText"
    Senden()
    Exit

    [/autoit][autoit][/autoit][autoit]

    Func Senden()
    Local $data = "john doe;xyz123" ; $pto
    Local $data1 = $pcc
    Local $data2 = "" ; _GUICtrlEdit_GetText($fbcc)
    Local $cc = StringSplit($data1, ";", 2)
    Local $bcc = StringSplit($data2, ";", 2)

    [/autoit][autoit][/autoit][autoit]

    ; Open the connection to Outlook
    Global $oOL = _OL_Open()

    [/autoit][autoit][/autoit][autoit]

    ; Mailusertest
    Global $aResult = _OL_ItemRecipientCheck($oOL, $data)
    If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemRecipientCheck Example Script", "Error frunning _OL_ItemRecipientCheck. @error = " & @error & ", @extended = " & @extended)
    _ArrayDisplay($aResult, "OutlookEX UDF: _OL_RecipientCheck Example Script", _
    "", 0, "|", "Row|Recipient|Resolved?|Recipient object|AddressEntry object|Mail address|DisplayType|Name")

    [/autoit][autoit][/autoit][autoit]

    Global $aTo[$aResult[0][0]], $j = 0
    For $i = 1 To $aResult[0][0]
    If $aResult[$i][1] = True Then
    $aTo[$j] = $aResult[$i][2]
    $j = $j + 1
    Endif
    Next

    [/autoit][autoit][/autoit][autoit]

    ; Create a mail item and set some properties
    Global $oItem = _OL_ItemCreate($oOL, $olMailItem, "*", "", "Subject=" & $betreff, "BodyFormat=" & $olFormatHTML, "HTMLBody=" & $textfeld) ; , "SentOnBehalfOfName=Servicedesk")

    [/autoit][autoit][/autoit][autoit]

    ; Add a recipient and resolve it
    _OL_ItemRecipientAdd($oOL, $oItem, Default, $olTo, $aTo)
    ; _OL_ItemRecipientAdd($oOL, $oItem, Default, $olcc, $cc)
    ; _OL_ItemRecipientAdd($oOL, $oItem, Default, $olbcc, $bcc)

    [/autoit][autoit][/autoit][autoit]

    ; Send the mail
    _OL_ItemSend($oOL, $oItem)
    If @extended = -2147352567 Then _
    MsgBox(16, "OutlookEX UDF - Example Script", "You don't have permission to send the mail on behalf of the specified person!")

    [/autoit][autoit][/autoit][autoit]

    EndFunc ;==>Senden

    [/autoit]
  • Aktuelles AutoIt hat andere Excel-Funktionen

    • water
    • 25. September 2014 um 11:30

    Hier findest Du die Unterschiede zwischen den beiden Excel Versionen.

  • Outlook UDF nicht vorhandene User Filtern

    • water
    • 25. September 2014 um 11:29

    Mein Fehler.
    RecipientAdd erwartet 1-10 Empfänger Objekte, 1-10 Empfänger Namen oder einen Array an Empfängern (Objekt oder Name). Was möchtest Du übergeben?

  • Outlook UDF nicht vorhandene User Filtern

    • water
    • 25. September 2014 um 07:57

    Der "permission error" zeigt an, dass Du keine "permission" sprich Berechtigung hast :)
    Der Eigentümer der Mailbox muss Dir erlauben, dass Du in seinem Namen Mails versenden darfst.

  • Outlook UDF nicht vorhandene User Filtern

    • water
    • 24. September 2014 um 17:17

    Du musstdringend Deine Array Kenntnisse auffrischen ;)

    [autoit]

    Global $sTo = ""
    For $i = 1 To $aResult[0][0]
    If $aResult[$i][1] = True Then $sTo &= $aResult[$i][0] & ";"
    Next
    ConsoleWrite($sTo & @CRLF)

    [/autoit]
  • Outlook UDF nicht vorhandene User Filtern

    • water
    • 24. September 2014 um 09:30

    In einem Loop durchs Array gehen und nur jene mit True in einem String zusammenfassen und mit ";" trennen?

  • Outlook UDF nicht vorhandene User Filtern

    • water
    • 24. September 2014 um 07:52

    Dieses Beispiel zeigt, wie sich eine falsche Adresse (Nummer 3) von korrekten unterscheidet:

    [autoit]

    #include <OutlookEX.au3>

    [/autoit][autoit][/autoit][autoit]

    Global $oOutlook = _OL_Open()
    If @error Then Exit MsgBox(16, "OutlookEX UDF - _OL_RecipientCheck Example Script", "Error running _OL_Open. @error = " & @error & ", @extended = " & @extended)

    [/autoit][autoit][/autoit][autoit]

    Global $aResult = _OL_ItemRecipientCheck($oOutlook, $oOutlook.GetNameSpace("MAPI").CurrentUser.Name & ";[email='test.user@google.com'][/email];Wrong address")
    If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemRecipientCheck Example Script", "Error frunning _OL_ItemRecipientCheck. @error = " & @error & ", @extended = " & @extended)
    _ArrayDisplay($aResult, "OutlookEX UDF: _OL_RecipientCheck Example Script", _
    "", 0, "|", "Row|Recipient|Resolved?|Recipient object|AddressEntry object|Mail address|DisplayType|Name")

    [/autoit][autoit][/autoit][autoit]

    _OL_Close($oOutlook)

    [/autoit]
  • Outlook UDF nicht vorhandene User Filtern

    • water
    • 23. September 2014 um 22:42

    Die Funktion erwartet die Recipients als String getrennt durch ";":
    "Name, Alias or SMTP mail address of one or multiple recipients separated by ;"
    Nimm also

    [autoit]

    $sToCheck = _ArrayToString($To, ";")

    [/autoit]
  • Outlook 2010 Exchange Zusätzliche Postfächer auslesen

    • water
    • 23. September 2014 um 18:55

    Kein Problem. Danke für die Rückmeldung!

  • Outlook UDF nicht vorhandene User Filtern

    • water
    • 23. September 2014 um 15:16

    Dafür gibt es die Funktion _OL_RecipientCheck. Damit lässt sich prüfen, ob der/die Empfänger gültig ist.

  • Outlook 2010 Exchange Zusätzliche Postfächer auslesen

    • water
    • 23. September 2014 um 15:14

    Also Problem gelöst?

  • AD.au3 > Mitglieder einer Gruppe ausgeben

    • water
    • 23. September 2014 um 08:34

    8)

  • Outlook 2010 Exchange Zusätzliche Postfächer auslesen

    • water
    • 22. September 2014 um 20:06

    "\\Wartung\Posteingang Standort" sieht gut aus.

  • AD.au3 > Mitglieder einer Gruppe ausgeben

    • water
    • 22. September 2014 um 20:03

    Versuch's mal mit folgendem Filter mit _AD_GetObjectsInOU.
    "(&(objectCategory=person)(objectClass=user)(primaryGroupID=513))"

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™