dim fso
dim fil
dim rw
dim datei
dim jahr
dim monat
dim tag
jahr=year(now)
monat=month(now)
tag=day(now)
if jahr<2000 then jahr=2000 + jahr
if monat<10 then monat="0" & monat
if tag<10 then tag="0" & tag
datei="d:\" & jahr & "_" & monat & "_" & tag & ".txt"
on error resume next
set fso=createobject("Scripting.FileSystemObject")
set fil=fso.Getfile(datei)
if fil is nothing then
set rw=fso.CreateTextFile(datei, true, false)
rw.write(now)
rw.close
dim d
dim urlaub
urlaub=msgbox("Haben Sie Urlaub gehabt?", vbyesno)
d=weekday(now, vbmonday)
if d=5 then
if urlaub=6 then
Dim olApp
Dim oItem
Dim Betr
Dim Text
Dim Empf
Dim Tage
While Tage=""
Tage=inputbox("Geben Sie bitte ihre Anzahl an Urlaubstagen dieser Woche ein:")
if isempty(Tage) then
Tage="nichts"
End if
Wend
If Not Tage="nichts" Then
set olApp=CreateObject("Outlook.Application")
Set oItem = olApp.CreateItem(0)
Betr="Urlaubstage"
Inh="Ich habe " & Tage & " Urlaubstage genommen!"
With oItem
.Subject = Betr
.To = "irgendwas@irgendwo.de"
.Body = Inh
.Send
End With
Set oItem = Nothing
Set olApp = Nothing
end if
End If
End If
set rw=nothing
end if
set fil=nothing
set fso=nothing
Gruß aus Ostfriesland. Möge Tux mit Dir sein!
ff
geschrieben von effeff , 28.04.2006, 15:01 Uhr , 26 mal gelesen