Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Envío outlook automático macro excel- error

publicado

Hola,

Tengo la siguiente Macro:

Sub enviar()

Sheets("envios").Select

ufila = Range("a" & Rows.Count).End(xlUp).Row

For i = 1 To ufila

If Cells(i, 7) = Cells(i, 1) Then

Set parte1 = CreateObject("outlook.application")

Set parte2 = parte1.createitem(olmailitem)

parte2.To = Cells(i, 8) & ";" & Cells(i, 9)

parte2.CC = Cells(i, 10) & ";" & Cells(i, 11)

parte2.Subject = "Cumpleaños" '"Asunto"

'"Cuerpo del mensaje"

parte2.body = "Buenos días," & vbCrLf & vbCrLf & "Nos es grato comunicarles que es el cumpleaños de " & Cells(i, 5) & "." & vbCrLf & vbCrLf & "Un saludo."

'parte2. Attachments.Add Ruta & Archivo

parte2.send

parte2.Display 'El correo se muestra

End If

Next

End Sub

Pero no se me envía automáticamente el correo, me sale el siguiente mensaje de error:

Se ha producido el error ‘-2147467259(80004005)’ en tiempo de ejecución:

Debe haber como mínimo, un nombre o un grupo de contactos en los cuadros Para, CC o CCO

En cambio si le quito la función parte2.send funciona perfectamente.

Alguién puede ayudarme?

No soy informática, llevo toda la tarde para poder hacer esta Macro, seguramente que sencilla, para conseguir enviar automáticamente correos cuando cuando un vencimiento cumple, hasta aquí he llegado pero no consigo averiguar por qué no se envían automáticamente. :(

Gracias mil.

Olga

Featured Replies

No hay posts para mostrar

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.