0

I am still kinda new to VBA, and this is a little outside my depth. I have found this thread here Save attachments to a folder and rename them but I feel like this is more code then I need, and it confuses me -.- . All i need to do is save a text file from a specific folder in outlook to a file on my local disk.

Community
  • 1
  • 1
Timothy Hall
  • 89
  • 2
  • 7
  • The solution you are referencing is fine. If you remove all comments the solution provided is actually quite short. Also the solution you are referencing is looping through Outlook-Folders to get the email and attachment you want. How else do you want to tell the VBA code which email to open and which txt attachment to save? In my opinion the solution you are referencing is fine. If you have difficulties implementing it or adjusting it to your needs then you should hire a VBA programmer or try it yourself. With the last bit we might be able to help you once you have shown some efforts. – Ralph Dec 27 '15 at 12:19

1 Answers1

0

As per the comment above the code is easier than first looks, I would recommend to take some time going through that solution, you can step through the code using F8 and hovering over variables details what they have been resolved to. This helps to breakdown seemingly difficult code.

Copying a specific file is easy to do with something like FileCopy?

Sub Copy_File()

    FileCopy "C:\SourceFolder\Test.txt", "C:\Users\DestFolder\Test.txt"

End Sub

(Code should be run in vba editor - shortcut ALT+F11 - then copy code in new module and use F8 to step through)

Sam Gilbert
  • 1,642
  • 3
  • 21
  • 38