ApplePirate
Programmer
Ive obtained this code from another thread,
option explicit
Function Item_Open()
dim objNameSpace
dim objFolder
dim objItem
dim objAttachment
dim intIndex
dim intIndex2
dim strFiles
set objNameSpace = Application.GetNameSpace("MAPI"
set objFolder = objNameSpace.PickFolder
for intIndex = 1 to objFolder.Items.Count
set objItem = objFolder.Items(intIndex)
if objItem is nothing then
else
for intIndex2 = 1 to objItem.Attachments.Count
set objAttachment = objItem.Attachments(intIndex2)
if objAttachment is nothing then
else
objAttachment.SaveAsFile "c:import\" & objAttachment.FileName
strFiles = strFiles & objAttachment.FileName & vbCR
end if
next
end if
next
Item.Body = strFiles
End Function
can anyone tell me how i remove the "pickfolder" option and replace with default folder to look in?
option explicit
Function Item_Open()
dim objNameSpace
dim objFolder
dim objItem
dim objAttachment
dim intIndex
dim intIndex2
dim strFiles
set objNameSpace = Application.GetNameSpace("MAPI"
set objFolder = objNameSpace.PickFolder
for intIndex = 1 to objFolder.Items.Count
set objItem = objFolder.Items(intIndex)
if objItem is nothing then
else
for intIndex2 = 1 to objItem.Attachments.Count
set objAttachment = objItem.Attachments(intIndex2)
if objAttachment is nothing then
else
objAttachment.SaveAsFile "c:import\" & objAttachment.FileName
strFiles = strFiles & objAttachment.FileName & vbCR
end if
next
end if
next
Item.Body = strFiles
End Function
can anyone tell me how i remove the "pickfolder" option and replace with default folder to look in?