Thema Datum  Von Nutzer Rating
Antwort
25.02.2022 13:27:56 Steven
NotSolved
25.02.2022 15:58:18 RPP63
NotSolved
Rot Variable Mail Adresse - Ron de Bruin (Makro)
25.02.2022 16:05:23 Steven
NotSolved
26.02.2022 13:12:41 Gast89300
NotSolved

Ansicht des Beitrags:
Von:
Steven
Datum:
25.02.2022 16:05:23
Views:
429
Rating: Antwort:
  Ja
Thema:
Variable Mail Adresse - Ron de Bruin (Makro)

Hier das Makro:

-> Problem in Orange

..oder liegt ggf. das Problem im Script auf das das Makro zugreift?

--------------------------------------------------------------------------------------------

Option Explicit

Sub Mail_Only_Text()
    'Ron de Bruin : 20-Feb-2021
    'Mail only text example
    'Do not forget to add the custom functions into your own workbook
    'More Mail codes : https://macexcel.com/examples/mailpdf/macoutlook/

    Dim strbody As String

    'Create the body text in the strbody string
    'The first and last line are used to set the font and font size

    strbody = "<FONT size=""3"" face=""Calibri"">"

    strbody = strbody & "Hi there" & "<br>" & "<br>" & _
        "This is line 1" & "<br>" & _
        "This is line 2" & "<br>" & _
        "This is line 3" & "<br>" & _
        "This is line 4"

    strbody = strbody & "</FONT>"

    'Call the MailWithMacOutlookFunction to create the mail
    'When you use more mail addresses separate them with a ,
    'Change yes to no or leave it empty in the displaymail argument to send directly
    'Look in Outlook>Preferences for the account type and name of the account that you want to use
    'If accounttype is empty it will use the default mail account, accounttype can be "exchange", "pop" or "imap"
    'Note: It will use the signature of the account that you choose
    'attchment is used for one file and you can use otherattachments to add other existing files like
    'otherattachments:="/Users/rondebruin/Desktop/Summary code.xlsm"
    'When you use more mail file path's in otherattachments separate them with a ,


    MailWithMacOutlookFunction _
    subject:="This is a test macro", _
    mailbody:=strbody, _
    toaddress:="ron@debruin.nl", _
    ccaddress:="", _
    bccaddress:="", _
    displaymail:="yes", _
    accounttype:="", _
    accountname:="", _
    attachment:="", _
    otherattachments:=""
End Sub


-------------------------------------------------------------------------------------------------------------------------------------------

Function MailWithMacOutlookFunction(subject As String, mailbody As String, _
    toaddress As String, ccaddress As String, _
    bccaddress As String, displaymail As String, _
    accounttype As String, accountname As String, _
    attachment As String, otherattachments As String)
    ' https://macexcel.com/examples/mailpdf/macoutlook/
    ' Ron de Bruin : 20-Feb-2021

    Dim ScriptStr As String, RunMyScript As String

    'Build the AppleScriptTask parameter string
    ScriptStr = subject & ";" & mailbody & ";" & toaddress & ";" & ccaddress & ";" & _
        bccaddress & ";" & displaymail & ";" & accounttype & ";" & _
        accountname & ";" & attachment & ";" & otherattachments

    'Call the RDBMacOutlook(2).scpt script file with the AppleScriptTask function
    RunMyScript = AppleScriptTask("RDBMacOutlook(2).scpt", "CreateMailInOutlook", CStr(ScriptStr))
End Function


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
25.02.2022 13:27:56 Steven
NotSolved
25.02.2022 15:58:18 RPP63
NotSolved
Rot Variable Mail Adresse - Ron de Bruin (Makro)
25.02.2022 16:05:23 Steven
NotSolved
26.02.2022 13:12:41 Gast89300
NotSolved