سؤال

How do I add an attachment in Outlook from Windows' %temp% folder?

Somewhere in the script I have:

Dim tempfolder
Set tempfolder = objFSO.GetSpecialFolder(TemporaryFolder)

(...)

objMailItem.Attachments.add tempfolder & "\file.zip"

but it does not work. Any ideas? Thanks a million.

هل كانت مفيدة؟

المحلول

You have to put in value 2 not the constant temporaryfolder. Remember VBS is late bound so their are no constants from objects. You have to look it up and put the value in.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top