# Outlook VBA add attachment



## Dancey_ (Oct 3, 2011)

Hi guys,

Hope you can help as I couldn't find anywhere as helpful!

I am trying to achieve something very simple with VBA in Outlook but cant seem to crack it.

I need to be able to attached a file call it "C:\Users\tom.dance\Desktop\test.txt" for example

I have found how to create a new email, then add this attachment and send the email.

However, I just simply want to be able to add said attachment to an existing email (that is open) and do nothing more.

I cannot find how to refer to the open window, I need something like active workbook in excel.

Cheers


----------



## wigi (Oct 3, 2011)

Hello Dancey,

you can use:


```
Sub wigi()
    ActiveInspector.CurrentItem.Attachments.Add "C:\Users\tom.dance\Desktop\test.txt"
End Sub
```


----------



## Dancey_ (Oct 4, 2011)

Hi Wigi,

Your a star, I'll check it out once I have access to a PC a little bit later.

Thanks


----------

