1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim Doc As NotesDocument
Dim object As NotesEmbeddedObject
Dim WApp As Variant
Dim BMRange As Variant
Set uidoc = ws.CurrentDocument
Set Doc = ws.CurrentDocument.Document
Print ("Lettre " & Doc.ChoixFichierWord(0))
If Doc.ChoixFichierWord(0) = "Mailing" Then
Set object = Doc.EmbeddedObjects(1)
Else ' Courrier simple
Set object = Doc.EmbeddedObjects(0)
End If
Set WApp = object.Activate ( True )
If Doc.ChoixFichierWord(0) = "Mailing" Then
rep% = Messagebox ("Voulez-vous fermer le mailing Word ?",36,"Gestion du Courrier")
Do While rep%=7
Set WApp = object.Activate ( True )
rep% = Messagebox ("Voulez-vous fermer le mailing Word ?",36,"Gestion du Courrier")
Loop
Set WApp = object.Activate ( True )
WApp.Save
Set WApp = Nothing
Set object = Nothing
Exit Sub
End If |
Partager