
En repetidas ocasiones tengo que enviar correos electrónicos que son casi idénticos excepto que tienen un número de caso diferente. Me gustaría configurar Outlook para que simplemente me pida el número de caso, lo complete en el lugar apropiado en el cuerpo y el asunto del correo electrónico y luego lo envíe a una lista preestablecida de destinatarios (es una lista estática de personas).
Creo que alguna combinación de formularios y plantillas debería poder hacer esto, pero no estoy seguro de cómo.
Respuesta1
Una posible solución VBA
Sub Boilerplate_CaseNumber()
Dim objMail As MailItem
Dim allRecipients As Recipients
Dim uPrompt As String
Dim uCaseNum As String
Set objMail = Application.CreateItem(olMailItem)
Set allRecipients = objMail.Recipients
allRecipients.Add "Your distribution list name inside the quotes"
allRecipients.ResolveAll
uPrompt = "What is the case number?"
uCaseNum = InputBox(prompt:=uPrompt, Title:="Case number")
objMail.Subject = "Here is the Case Number: " & uCaseNum
objMail.Body = "Hello," & vbCrLf & vbCrLf & _
"The case number is: " & uCaseNum & "." & vbCrLf & vbCrLf & _
"Yours," & vbCrLf & vbCrLf & _
"Mykroft"
SendKeys "^{END}"
objMail.Display
Set objMail = Nothing
Set allRecipients = Nothing
End Sub
Sub Boilerplate_CaseNumber_WordEditor()
Dim objMail As MailItem
Dim allRecipients As Recipients
Dim uPrompt As String
Dim uCaseNum As String
Dim objDoc
Dim objSel
Set objMail = Application.CreateItem(olMailItem)
Set allRecipients = objMail.Recipients
allRecipients.Add "Your distribution list name inside the quotes"
allRecipients.ResolveAll
uPrompt = "What is the case number?"
uCaseNum = InputBox(prompt:=uPrompt, Title:="Case number")
objMail.Subject = "Here is the Case Number: " & uCaseNum
objMail.Display
Set objDoc = Application.ActiveInspector.WordEditor
Set objSel = objDoc.Windows(1).selection
objSel.TypeText Text:="Hello," & vbCrLf & vbCrLf & _
"The case number is: " & uCaseNum & "." & vbCrLf & vbCrLf & _
"Yours," & vbCrLf & vbCrLf & _
"Mykroft"
Set objDoc = Nothing
Set objSel = Nothing
Set objMail = Nothing
Set allRecipients = Nothing
End Sub
Editor y ayuda de botones -http://www.slipstick.com/developer/how-to-use-outlooks-vba-editor/
La seguridad macro debe establecerse en media.
Botón de ayuda -http://www.howto-outlook.com/howto/macrobutton.htm