vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Blitzschnelles Erstellen von grafischen Diagrammen!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB Skript (VBS)
Re: Import aus Outlook2000 nach ACCESS2000 
Autor: david-lynch
Datum: 17.06.07 00:51

...und die hier soll SENDER & EMPFÄNGER liefern ??

nur wie einbinden, damit ich die Werte auch laut meiner URSPRÜNGLICHEN FUNKTION in die Felder bekomme???

Attribute VB_Name = "basGetSenderAddy"
' *******************************************************************
' basGetSenderAddy
' Author: Sue Mosher, Slipstick Systems, sue@slipstick.com
' Date: 8 Sep 2000
' Ver: 1.0
' Desc: Demonstrates how to get the From and Reply To addresses
' from an Outlook message
' Unrestricted public use allowed of this code is allowed

' References: Microsoft Outlook 9.0 Object Library
' Microsoft CDO 1.21 Library
' *******************************************************************

Option Explicit
Const CdoE_ACCESSDENIED = 80070005


' *******************************************************************
' Name: ShowAddresses
' Desc: For currently displayed or selected message, prints both the
' From and Reply To addresses to the Immediate window
' In: Nothing
' Out: Nothing
' *******************************************************************
Sub ShowAddresses()
Dim obj As Object

Set obj = GetCurrentItem()
If obj.Class = olMail Then
Debug.Print GetFromAddress(obj)
Debug.Print GetReplyToAddress(obj)
End If

Set obj = Nothing
End Sub


' *******************************************************************
' Name: GetFromAddress
' Desc: Returns the address of the sender of the message
' In: MailItem object
' Out: From address unless an error is encountered. If there is an
' error, it returns "".
' *******************************************************************
Function GetFromAddress(objMsg As Outlook.MailItem)
Dim objSession As MAPI.Session
Dim objCDOMsg As MAPI.Message
Dim strEntryID As String
Dim strStoreID As String
Dim strAddress As String

' start CDO session
Set objSession = CreateObject("MAPI.Session")
objSession.Logon , , False, False

' pass message to CDO
strEntryID = objMsg.EntryID
strStoreID = objMsg.Parent.StoreID
Set objCDOMsg = objSession.GetMessage(strEntryID, strStoreID)

' get sender address
On Error Resume Next
strAddress = objCDOMsg.Sender.Address
If Err = CdoE_ACCESSDENIED Then
'handle possible security patch error
MsgBox "The Outlook E-mail and CDO Security Patches are " & _
"apparently installed on this machine. " & _
"You must response Yes to the prompt about " & _
"accessing e-mail addresses if you want to " & _
"get the From address.", vbExclamation, _
"GetFromAddress"
End If

GetFromAddress = strAddress

On Error GoTo 0
Set objCDOMsg = Nothing
objSession.Logoff
Set objSession = Nothing
End Function

Teil...2 folgt
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Import aus Outlook2000 nach ACCESS20001.230david-lynch16.06.07 01:10
Re: Import aus Outlook2000 nach ACCESS2000812david-lynch17.06.07 00:48
Re: Import aus Outlook2000 nach ACCESS2000761david-lynch17.06.07 00:51
Re: Import aus Outlook2000 nach ACCESS2000756david-lynch17.06.07 00:52

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel