Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
#31693
Olá, Bom dia!
Preciso de uma ajuda, estou criando uma macro que envie um e-mail automático por excel, via código VBA.
Preciso que ela busque um anexo em um diretório, mas não estou conseguindo aplicar o código corretamente, segue abaixo:

Sub Enviar_Email()
ActiveSheet.Range("B10:K100").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "Por gentileza realizar link abaixo"
.Item.To = Range("C2").Value
.Item.CC = Range("C4").Value
.Item.Subject = Range("C6").Value
.Item.Attachments.Add = Range("C8").Value
.Item.Send
End With
End Sub

Preciso que nessa linha ".Item.Attachments.Add = Range("C8").Value" ele busque o arquivo no diretório informado na célula C8.

Muito Obrigada! :)
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord