Visual Basic-Quellcode
- Sub SaveAsTXT()
- Dim myItem As Outlook.Inspector
- Dim objItem As Object
- Set myOlApp = CreateObject("Outlook.Application")
- Set myItem = myOlApp.ActiveInspector
- If Not TypeName(myItem) = "Nothing" Then
- Set objItem = myItem.CurrentItem
- strname = objItem.Subject
- 'Prompt the user for confirmation
- Dim strPrompt As String
- strPrompt = "Are you sure you want to save the item? If a file with the same name already exists, it will be overwritten with this copy of the file."
- If MsgBox(strPrompt, vbYesNo + vbQuestion) = vbYes Then
- objItem.SaveAs "C:\" & strname & ".txt", olTXT
- End If
- Else
- MsgBox "There is no current active inspector."
- End If
- End Sub
Wo ist in dem Script der fehler beim ausführen sagt es mir zeile 2 anweisungsende erwartet .......