- Dieses Thema hat 0 Antworten und 1 Stimme, und wurde zuletzt aktualisiert 18:45 um 11. Mai 2011 von .
1 Antwort anzeigen (von insgesamt 1)
1 Antwort anzeigen (von insgesamt 1)
Home-›Foren-›Outlook-›Outlook VBA-›Datei an eine Email anhängen mit einem Makro
Hallo,
wir haben bis jetzt PDF-Zeichnungen aus einem bestimmten Path von einem Server mit dem unten aufgeführten Makro unter Outlook 2003 in eine Email über ein Formular in dem man die Zeichnungsnummer (=Dateinamen) eingibt eingefügt.
Unter Outlook 2010 funktioniert es allerdings nicht mehr. Ich hoffe Ihr könnt mir helfen.
Fehlermeldung:
Fehler # 424 wurde ausgelöst von Projekt1
Objekt erforderlich
Script:
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyReturn Then
On Error Resume Next
Err.Clear
Auswahl = TextBox1.text
TextBox1.text = \“\“
Selection.InsertFile FileName:=\“\\\\Server\\Freigabe\\\“ + Auswahl + \“.pdf\“, Attachment:=True
If Err.Number <> 0 Then
If Err.Number = 5174 Or Err.Number = 5273 Then
MsgBox \“Datei wurde nicht gefunden. Sie haben die Datei \“ + Auswahl + \“.pdf ausgewählt\“, , \“Fehler\“
TextBox1.TabIndex = 0
Else
Mldg = \“Fehler # \“ & Str(Err.Number) & \“ wurde ausgelöst von \“ _
& Err.Source & Chr(13) & Err.Description
MsgBox Mldg, , \“Fehler\“, Err.HelpFile, Err.HelpContext
End If
Else
ListBox1.AddItem (Auswahl + \“.pdf\“)
End If
End If
End Sub
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.