Bye.
Andy
Ingo Maus schrieb in Nachricht <3785...@isoit370.bbn.hp.com>...
Beachtlich, beachtlich. Da hat sich eine harmlose Frage innerhalb
von acht Minuten in schiere Verzweiflung gewandelt.
Und was willst Du mit einer (englischen) Excel Frage in dieser
(deutschsprachigen) Access-NG ?
Vermutlich eine Antwort. Blöde Frage von mir, Verzeihung.
> Is there a way apart from typing ;-) ?
Vermutlich schon, aber für Excel kann ich das nicht sagen.
> There MUST be a way to import .dbf or .xls files as
> contacts into Outlook (98)
Ja, wenn Du das sagst ...
> Any hint is welcome...
Dann heisse mal Folgendes willkommen, das ich zur Zeit verwende
(bis mir hier in diesem Thread was besseres vorgeschlagen wird)
Function TelIntToOutl() As Boolean
On Error GoTo Err_TelIntToOutl
Dim AktRS As Recordset
Dim OutlApp As New Outlook.Application, NSPObj As
Outlook.NameSpace, OutlFolder As Outlook.MAPIFolder
Dim DelCont As Object, AktCont As Outlook.ContactItem
Dim vSaveAs As String, vI As Integer
Dim vBerAbt As String, vBer As String, vAbtlg As String, vUAbtlg
As String
Dim MstrFldrNameLv1 As String, MstrFldrNameLv2 As String,
MstrFldrNameLv3 As String, FldrName As String
TelIntToOutl = False
DoCmd.Hourglass True
Set AktRS = CurrentDb().OpenRecordset("A_TelTempExp",
dbOpenSnapshot)
Set NSPObj = OutlApp.GetNamespace("MAPI")
Set OutlFolder = NSPObj.Folders("Öffentliche Ordner")
Set OutlFolder = OutlFolder.Folders("Alle Öffentlichen Ordner")
Set OutlFolder = OutlFolder.Folders("SBL - Diverses")
Set OutlFolder = OutlFolder.Folders("internes Telefonverzeichnis")
For Each DelCont In OutlFolder.Items
DelCont.Delete
Next DelCont
While Not AktRS.EOF
DoEvents
vSaveAs = ""
If AktRS![NachN] > " " Then
vSaveAs = Trim$(AktRS![NachN])
End If
If AktRS![NachN] > " " And AktRS![VorNa] > " " Then
vSaveAs = vSaveAs & " "
End If
If AktRS![VorNa] > " " Then
vSaveAs = vSaveAs & Trim$(AktRS![VorNa])
End If
If AktRS![VorNa] > " " And AktRS![Titel] > " " Then
vSaveAs = vSaveAs & ", "
End If
If AktRS![Titel] > " " Then
vSaveAs = vSaveAs & Trim$(AktRS![Titel])
End If
vBerAbt = ""
If AktRS![L2_OrgTx] > " " Then
vBerAbt = Trim$(AktRS![L2_OrgTx])
End If
If AktRS![L2_OrgTx] > " " And AktRS![L3_OrgTx] > " " Then
vBerAbt = vBerAbt & "; "
End If
If AktRS![L3_OrgTx] > " " Then
vBerAbt = vBerAbt & Trim$(AktRS![L3_OrgTx])
End If
If AktRS![L3_OrgTx] > " " And AktRS![L4_OrgTx] > " " Then
vBerAbt = vBerAbt & "; "
End If
If AktRS![L4_OrgTx] > " " Then
vBerAbt = vBerAbt & Trim$(AktRS![L4_OrgTx])
End If
If IsNull(AktRS![L2_LfdNr_Orgeh]) Then
If AktRS![L2_OrgTx] > " " Then
vBer = " " & Trim$(AktRS![L2_OrgTx])
Else
vBer = " "
End If
Else
If AktRS![L2_OrgTx] > " " Then
vBer = Format$(AktRS![L2_LfdNr_Orgeh], "000000") & " "
& Trim$(AktRS![L2_OrgTx])
Else
vBer = Format$(AktRS![L2_LfdNr_Orgeh], "000000")
End If
End If
If IsNull(AktRS![L3_LfdNr_Orgeh]) Then
If AktRS![L3_OrgTx] > " " Then
vAbtlg = " " & Trim$(AktRS![L3_OrgTx])
Else
vAbtlg = " "
End If
Else
If AktRS![L3_OrgTx] > " " Then
vAbtlg = Format$(AktRS![L3_LfdNr_Orgeh], "000000") & "
" & Trim$(AktRS![L3_OrgTx])
Else
vAbtlg = Format$(AktRS![L3_LfdNr_Orgeh], "000000")
End If
End If
If IsNull(AktRS![L4_LfdNr_Orgeh]) Then
If AktRS![L4_OrgTx] > " " Then
vUAbtlg = " " & Trim$(AktRS![L4_OrgTx])
Else
vUAbtlg = " "
End If
Else
If AktRS![L4_OrgTx] > " " Then
vUAbtlg = Format$(AktRS![L4_LfdNr_Orgeh], "000000") &
" " & Trim$(AktRS![L4_OrgTx])
Else
vUAbtlg = Format$(AktRS![L4_LfdNr_Orgeh], "000000")
End If
End If
Set AktCont = OutlApp.CreateItem(olContactItem)
If AktRS![NachN] > " " Then AktCont.LastName = AktRS![NachN]
If AktRS![VorNa] > " " Then AktCont.FirstName = AktRS![VorNa]
If AktRS![Titel] > " " Then AktCont.Title = AktRS![Titel]
'If AktRS![TelNr] > " " Then AktCont.PrimaryTelephoneNumber =
AktRS![TelNr]
If AktRS![TelNr] > " " Then AktCont.BusinessTelephoneNumber =
AktRS![TelNr]
If AktRS![Ort01] > " " Then AktCont.BusinessAddressCity =
AktRS![Ort01]
If AktRS![Stras] > " " Then AktCont.BusinessAddressStreet =
AktRS![Stras]
If AktRS![ZimNr] > " " Then AktCont.OfficeLocation =
AktRS![ZimNr]
'If AktRS![NachN] > " " Then AktCont.OtherAddressState =
AktRS![NachN]
'If AktRS![VorNa] > " " Then AktCont.OtherAddressCountry =
AktRS![VorNa]
If vBer > " " Then AktCont.CompanyName = vBer
If vAbtlg > " " Then AktCont.Department = vAbtlg
If vUAbtlg > " " Then AktCont.User1 = vUAbtlg
If vBerAbt > " " Then AktCont.Categories = vBerAbt
If vSaveAs > " " Then AktCont.FileAs = vSaveAs
If Trim$(Nz(AktRS![Priox], " ")) = "1" And AktRS![STTxt] > " "
Then
AktCont.Profession = Trim$(AktRS![STTxt])
End If
If AktRS![R3] Then
AktCont.JobTitle = "M" & AktRS![Priox]
Else
AktCont.JobTitle = "n. Pers."
End If
AktCont.MessageClass = "IPM.Contact.intTelDetail"
AktCont.Actions.Add
AktCont.Move OutlFolder
AktRS.MoveNext
Wend
AktRS.Close
TelIntToOutl = True
Exit_TelIntToOutl:
Set AktCont = Nothing
Set OutlFolder = Nothing
Set NSPObj = Nothing
Set OutlApp = Nothing
Set AktRS = Nothing
DoCmd.Hourglass False
Exit Function
Err_TelIntToOutl:
MsgBox "Modul 'TelIntToOutl' - Fehler Nr." & Str$(Err.Number) & "
: " & Err.Description
Resume Exit_TelIntToOutl
End Function
Du musst jetzt für excel vermutlich nur noch das Recordset und das
Durchlaufen desselben durch irgendwelche Range-Objekte und
Offsets dazu ersetzen, nicht wahr, und schon hat die Verzweiflung
ein Ende.
In diesem Sinne ein frohsinniges Wochenende,
Gf.
> Und was willst Du mit einer (englischen) Excel Frage in dieser
> (deutschsprachigen) Access-NG ?
-----
Sollte dies eine "Access" NG sein?
Dem Titel nach doch wohl "Vermengtes" und nicht Access.
Rainald
>Kurt Grof <kurt...@sbl.co.at> schrieb in im Newsbeitrag:
>3785EDF4...@sbl.co.at...
>> Und was willst Du mit einer (englischen) Excel Frage in dieser
>> (deutschsprachigen) Access-NG ?
>-----
>Sollte dies eine "Access" NG sein?
Wann immer man "diese Newsgruppe" schreibt, sollte man vorher in den
Kopf nach der Gruppenlist schauen...
----------------->
de.admin.mail
de.alt.shareware
de.comp.databases
de.comp.datenbanken.misc
de.comp.datenbanken.ms-access
de.comp.office-pakete.misc
de.comp.os.ms-windows
de.comp.os.ms-windows.misc
microsoft.public.de.german.frontpage98
microsoft.public.exchange.m
<-------------------------^^^^^^
Irgendwo scheint die bei 247 Zeichen abgebrochen worden zu sein...
Gruss, Holger
Gruß
Rainald