How can I drag and drop the attachments from outlook to ahk gui
Code: Select all
Gui,2: Font, default,
Gui,2:Show, x50 y10 w120 h120,%Filename1%
Gui,2:add,edit, x10 y10 h100 w100 vF1 +center -VScroll ,Drop file here
return
2Guiclose:
exitapp
2GuiDropFiles:
olApp := ComObjActive("Outlook.Application")
try
olItem := olApp.ActiveWindow.CurrentItem
catch
ComObjError(false)
olItem := olApp.ActiveExplorer.Selection.Item(1)
if (olItem.Class = 43)
olMailItem := olItem
else
{
return
}
GuiControl,2:,F1
Loop, parse, A_GuiEvent, `n
FileCopy, %A_LoopField%, C:TEST\
return