Alerta - Email Sem Assunto

1

Click here to load reader

description

EMAIL: Subject is Empty. Are you sure you want to send the Mail?

Transcript of Alerta - Email Sem Assunto

Page 1: Alerta - Email Sem Assunto

Alerta - Email sem Assunto (Microsoft Outlook)

Vou explicar abaixo como podemos criar um alerta no Outlook sempre que tentamos enviar um email sem o campo Assunto devidamente preenchido, tal como sucede actualmente quando utilizamos o Gmail.

Procedimentos:

1. Abrir o Microsoft Outlook

2. Carregar em Alt+F11 para abrir o editor de Visual Basic. Carregar em Ctrl+R para abrirum novo projecto (do lado esquerdo).

3. Expandir o painel da esquerda “Microsoft Outlook Objects” ou “Project1″. Agora podemosver “ThisOutLookSession”.

4. Duplo click em “ThisOutLookSession”.

5. Copiar para lá o seguinte codigo:.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)Dim strSubject As StringstrSubject = Item.SubjectIf Len(Trim(strSubject)) = 0 ThenPrompt$ = "Subject is Empty. Are you sure you want to send the Mail?"If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for Subject") = vbNo ThenCancel = TrueEnd IfEnd IfEnd Sub