Drag and drop from outlook

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Pilu
Posts: 84
Joined: 22 Jun 2018, 01:13

Drag and drop from outlook

26 Oct 2021, 03:32

Hi,

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
User avatar
mikeyww
Posts: 26931
Joined: 09 Sep 2014, 18:38

Re: Drag and drop from outlook

26 Oct 2021, 04:51

Although I have not tried this, you might need to save or extract the file first. The following post might help. viewtopic.php?p=318293#p318293

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Panaku, Rohwedder, roysubs and 316 guests