von Stephan » Fr, 13.08.2004 23:10
Hallo Charly,
so kannst Du die Daten des gerade aktiven Benutzers auslesen:
Code: Alles auswählen
Sub Benutzerdaten
Dim DATEN(13, 1)
Dim ergebnis
Dim nutzer as Object
Dim reg_daten as Object
Dim profil(0) as new com.sun.star.beans.PropertyValue
nutzer = createUnoService("com.sun.star.configuration.ConfigurationProvider")
profil(0).Name = "nodepath"
profil(0).Value = "org.openoffice.UserProfile/Data"
reg_daten = nutzer.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", profil())
DATEN(0,1) = reg_daten.o
DATEN(0,0) = "Firma: "
DATEN(1,1) = reg_daten.givenname
DATEN(1,0) = "Vorname: "
DATEN(2,1) = reg_daten.sn
DATEN(2,0) = "Nachname: "
DATEN(3,1) = reg_daten.initials
DATEN(3,0) = "Namenskürzel: "
DATEN(4,1) = reg_daten.title
DATEN(4,0) = "Titel: "
DATEN(5,1) = reg_daten.position
DATEN(5,0) = "Position: "
DATEN(6,1) = reg_daten.telephonenumber
DATEN(6,0) = "Telefon (geschäftlich): "
DATEN(7,1) = reg_daten.facsimiletelephonenumber
DATEN(7,0) = "Fax-Nummer: "
DATEN(8,1) = reg_daten.homephone
DATEN(8,0) = "Telefon (privat): "
DATEN(9,1) = reg_daten.mail
DATEN(9,0) = "Email: "
DATEN(10,1) = reg_daten.street
DATEN(10,0) = "Straße: "
DATEN(11,1) = reg_daten.postalcode
DATEN(11,0) = "Postleitzahl: "
DATEN(12,1) = reg_daten.c
DATEN(12,0) = "Land: "
DATEN(13,1) = reg_daten.l
DATEN(13,0) = "Ort: "
For i = 0 to 13
ergebnis = ergebnis & DATEN(i,0) & DATEN(i,1) & CHR(13)
Next i
MsgBox ergebnis
End Sub
Gruß
Stephan
Hallo Charly,
so kannst Du die Daten des gerade aktiven Benutzers auslesen:
[code]Sub Benutzerdaten
Dim DATEN(13, 1)
Dim ergebnis
Dim nutzer as Object
Dim reg_daten as Object
Dim profil(0) as new com.sun.star.beans.PropertyValue
nutzer = createUnoService("com.sun.star.configuration.ConfigurationProvider")
profil(0).Name = "nodepath"
profil(0).Value = "org.openoffice.UserProfile/Data"
reg_daten = nutzer.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", profil())
DATEN(0,1) = reg_daten.o
DATEN(0,0) = "Firma: "
DATEN(1,1) = reg_daten.givenname
DATEN(1,0) = "Vorname: "
DATEN(2,1) = reg_daten.sn
DATEN(2,0) = "Nachname: "
DATEN(3,1) = reg_daten.initials
DATEN(3,0) = "Namenskürzel: "
DATEN(4,1) = reg_daten.title
DATEN(4,0) = "Titel: "
DATEN(5,1) = reg_daten.position
DATEN(5,0) = "Position: "
DATEN(6,1) = reg_daten.telephonenumber
DATEN(6,0) = "Telefon (geschäftlich): "
DATEN(7,1) = reg_daten.facsimiletelephonenumber
DATEN(7,0) = "Fax-Nummer: "
DATEN(8,1) = reg_daten.homephone
DATEN(8,0) = "Telefon (privat): "
DATEN(9,1) = reg_daten.mail
DATEN(9,0) = "Email: "
DATEN(10,1) = reg_daten.street
DATEN(10,0) = "Straße: "
DATEN(11,1) = reg_daten.postalcode
DATEN(11,0) = "Postleitzahl: "
DATEN(12,1) = reg_daten.c
DATEN(12,0) = "Land: "
DATEN(13,1) = reg_daten.l
DATEN(13,0) = "Ort: "
For i = 0 to 13
ergebnis = ergebnis & DATEN(i,0) & DATEN(i,1) & CHR(13)
Next i
MsgBox ergebnis
End Sub[/code]
Gruß
Stephan