/ Forside / Teknologi / Internet / E-Mail / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
E-Mail
#NavnPoint
o.v.n. 20481
miritdk 16341
Klaudi 15049
refi 14168
dk 5455
tedd 5322
webnoob 5265
BjarneD 5014
emesen 4154
10  bentjuul 3460
VBA skriv i mail.
Fra : Jørgen Bondesen


Dato : 20-01-05 23:06

Hej NG.

Jeg har fundet nedenstående makro på nettet.
Hvordan kan jeg tilpasse den, så jeg kan tilføje en tekst der hvor markøren
er placeret i min mail.


Public Sub TimeStamp()
Dim objOutlook As Outlook.Application
Dim objInspector As Outlook.Inspector
Dim objItem As Object 'Allow any Outlook item type.

Dim strDateTime As String

On Error Resume Next

' Instantiate an Outlook Application object.
Set objOutlook = CreateObject("Outlook.Application")

' The ActiveInspector is the currently open item.
Set objInspector = objOutlook.ActiveInspector

' Check and see if anything is open.
If Not objInspector Is Nothing Then
' Get the current item.
Set objItem = objInspector.CurrentItem

' Get the current date and time.
strDateTime = Now()


' To add the date and time stamp to the end of the item,
' comment the preceding code line and uncomment the
' following code line.

'Top
'objItem.Body = strDateTime & objItem.Body

'Bottom
objItem.Body = objItem.Body & strDateTime & " jb"

Else
' Show error message with only the OK button.
MsgBox "No item is open", vbOKOnly
End If

' Set all objects equal to Nothing to destroy them and
' release the memory and resources they take.
Set objOutlook = Nothing
Set objInspector = Nothing
Set objItem = Nothing
End Sub



--
Med venlig hilsen
Jørgen Bondesen

Followup to newsgroup only please.
Jeg ønsker, at vi kommunikere via nyhedsgruppen, tak.




 
 
Søg
Reklame
Statistik
Spørgsmål : 177501
Tips : 31968
Nyheder : 719565
Indlæg : 6408526
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste