#  Other Applications & Softwares  > Outlook Formatting & Functions >  >  VBA Code to prompt while sending msgs from Outlook

## anwitha

Hi,

Can anyone help me in getting the VBA Code to prompt while sending msgs from Outlook.

Thanks.

----------


## skatonni

There is an example here  http://www.slipstick.com/outlook/ema...blank-subject/




```
Please Login or Register  to view this content.
```

----------


## anwitha

Hello,

Thanks for your help. Here my requiremnet is for each and every message which is going from outlook it should prompt the password and it has to go only after entering the password. can this be done?

----------


## skatonni

In the ThisOutlookSession module.

Option Explicit

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

    Dim strPrompt As String
    Dim strInput As String

    strPrompt = "Enter password to send the Mail."
    strInput = InputBox(prompt:=strPrompt)

    If strInput <> "Password" Then Cancel = True

End Sub

----------


## anwitha

Thanks a lot Skatonni. Its working superbly. But, while entering password some one can see this...Is it possible to show **** sign?

----------


## skatonni

In Excel yes https://support.microsoft.com/en-us/kb/830258

In Outlook you can try font colour the same as background colour.

Create a userform named Password_Hidden.

Add a textbox.
Set font colour the same as background colour in the textbox.

Add a command button. Double click to add this code



```
Please Login or Register  to view this content.
```


In ThisOutlookSession



```
Please Login or Register  to view this content.
```


In a regular module



```
Please Login or Register  to view this content.
```

----------


## tompho

thanks you for sharing give people

----------

