Thema Datum  Von Nutzer Rating
Antwort
Rot Outlook per VBA maximieren
05.08.2022 15:33:13 Vittorio0
NotSolved
06.08.2022 11:04:39 xlKing
NotSolved
06.08.2022 13:51:15 Gast61766
NotSolved
06.08.2022 15:07:57 Gast80888
NotSolved
06.08.2022 20:18:29 xlKing
NotSolved

Ansicht des Beitrags:
Von:
Vittorio0
Datum:
05.08.2022 15:33:13
Views:
427
Rating: Antwort:
  Ja
Thema:
Outlook per VBA maximieren

Hallo, ich habe eine Public Function in eines der Foren gefunden um Outlook 2019 zu öffnen. Der Aufruf funktionert, jedoch wird Outlook minimiert gestartet. Wie kann ich Outlook nun Outlook per VBA Maximized darstellen?

Danke für jede Hilfe

Vittorio0

 

Public Function SendOutlook(sSubject As String, sTo As String, Optional sCC As String, Optional sBcc As String, Optional sBody As String, Optional sAttachment As String, Optional sAttachment1 As String, Optional sAttachment2 As String)

'Only working in Office 2007 and higher
'Don't forget to set a reference to Outlook in the VBA editor
    Dim OutApp As Outlook.Application
    Dim OutMail As Outlook.MailItem
    Dim OutAccount As Outlook.Account
    Dim strbody As String
    
    Set OutApp = CreateObject("Outlook.Application")`    Set OutMail = OutApp.CreateItem(olMailItem)
    
    'Use the first account, see that Item is 1 now
    'Set OutAccount = OutApp.Session.Accounts.Item(1)
    'Or use the name instead of the number
    Set OutAccount = OutApp.Session.Accounts("email@email.com")
    
    sBody = ""
    OutMail.Attachments.Add (sAttachment)

    On Error Resume Next
    
    With OutMail
        .To = sTo 
        .CC = sCC 
        .BCC = ""
        .Subject = sSubject
        .HTMLBody = sBody
        .SendUsingAccount = OutAccount
        .Display   'or use .Send
    End With
   
    On Error GoTo 0
    
    Set OutMail = Nothing
    Set OutApp = Nothing
    Set OutAccount = Nothing

    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
Rot Outlook per VBA maximieren
05.08.2022 15:33:13 Vittorio0
NotSolved
06.08.2022 11:04:39 xlKing
NotSolved
06.08.2022 13:51:15 Gast61766
NotSolved
06.08.2022 15:07:57 Gast80888
NotSolved
06.08.2022 20:18:29 xlKing
NotSolved