Lone-wolf
XLDnaute Barbatruc
Bonjour à tous,
J'ai trouvé ceci sur le Net:
Pour de plus amples infos: http://www.codeforexcelandoutlook.com/
Est-il possible de regrouper ces fonctions et sub en 1?
J'ai trouvé ceci sur le Net:
Code:
Public Enum displayMode
vbModeless
vbModal
End Enum
Function DisplayNote(Note As Outlook.NoteItem, Optional displayMode As
displayMode = vbModal)
Note.Display displayMode
End Function
Function DeleteNote(Note As Outlook.NoteItem)
Note.Delete
End Function
Function NoteApplication(Note As Outlook.NoteItem) As Outlook.Application
Set NoteApplication = Note.Application
End Function
Function NoteLeft(Note As Outlook.NoteItem, Optional newLeft As Long) As
Long
' if new Left provided, change Left
If newLeft > 0 Then
Note.Left = newLeft
End If
' return value, whether changed or not
NoteLeft = Note.Left
End Function
Function NoteTop(Note As Outlook.NoteItem, Optional newTop As Long) As Long
' if new Top provided, change Top
If newTop > 0 Then
Note.Top = newTop
End If
' return value, whether changed or not
NoteTop = Note.Top
End Function
Function GetNoteItemProperties(Note As Outlook.NoteItem) As
Outlook.ItemProperties
Set GetNoteItemProperties = Note.ItemProperties
End Function
------------------------------------------------------------------------
Sub Properties()
Dim Note As Outlook.NoteItem
Dim noteProperties As Outlook.ItemProperties
Set Note = Outlook.CreateItem(olNoteItem)
Set noteProperties = GetNoteItemProperties(Note)
End Sub
Sub Display()
Dim Note As Outlook.NoteItem
Set Note = Outlook.CreateItem(olNoteItem)
Call DisplayNote(Note, vbModal)
End Sub
Sub Del()
Dim Note As Outlook.NoteItem
Set Note = Outlook.CreateItem(olNoteItem)
Call DeleteNote(Note)
End Sub
Sub Nouvelle_Note()
Dim Note As Outlook.NoteItem
Dim noteApp As Outlook.Application
Set Note = Outlook.CreateItem(olNoteItem)
Set noteApp = NoteApplication(Note)
End Sub
Sub GaucheNote()
Dim Note As Outlook.NoteItem
Dim lft As Long
Set Note = Outlook.CreateItem(olNoteItem)
lft = NoteLeft(Note)
End Sub
Sub TopNote()
Dim Note As Outlook.NoteItem
Dim tp As Long
Set Note = Outlook.CreateItem(olNoteItem)
tp = NoteTop(Note)
End Sub
Pour de plus amples infos: http://www.codeforexcelandoutlook.com/
Est-il possible de regrouper ces fonctions et sub en 1?