Drag to Outlook 2016 doesn't work

Support forum for our inter-application drag-n-drop components.

Drag to Outlook 2016 doesn't work

Postby thomas@nssco.com » Wed May 23, 2018 8:19 am

We used to be able to drag from our Delphi app to Outlook and it will accept the file as an attachment. Once we moved to Outlook 2016, it no longer works. It does nothing. This is our code for the drag portion:


// Detect a drag
if DragDetectEx(Handle, POINT(X,Y), DMTextSource1.MouseButton) then
begin
with DMTextSource1, CustomFormatData do
begin
// Always clear to prevent formats accumulating between drags.
Clear;

// A file group descriptor, so we'll find out about the file
// names dropped. Use a blank string so we'll get asked for these
// at drop-time.
AddFormat('FileGroupDescriptor', '');

// The file contents for each file we might be asked to fill in. Use
// a blank string for each so we'll get asked at drop time.
AddFormatEx('FileContents', '', TYMED_HGLOBAL, 0);

// Make sure we don't get a trailing null.
// Items[Count-1] is the TCustomFormatData we just added.
Items[Count-1].AllowTrailingNull := false;

// Finally, start the drag
Execute;
end;
end;

Using the formatviewer program, it shows 2 entries: FileGroupDescriptor and FileContents per the code. What do we need to add to make it work with Outlook 2016? We use DropMaster 2.4.9 with Delphi 10.2. Thanks.
thomas@nssco.com
 
Posts: 5
Joined:
Tue May 22, 2018 1:20 pm

Re: Drag to Outlook 2016 doesn't work

Postby DropMaster » Thu May 24, 2018 7:31 pm

It could be that Outlook 2016 wants to see FileGroupDescriptorW instead of FileGroupDescriptor. (I don't have access to Outlook 2016 so we're going to be a bit in the dark for a bit)

Did you try including

Code: Select all
AddFormat('FileGroupDescriptorW', '');


I think the code as written will already be providing a FileGroupDescriptorW to the caller (when your OnRenderCustomFormat handler is called). But let's see how this goes to begin with.

Hope this helps.
_________________________
DropMaster Support
DropMaster
 
Posts: 24
Joined:
Fri Apr 15, 2011 6:32 am

Re: Drag to Outlook 2016 doesn't work

Postby thomas@nssco.com » Thu Jun 07, 2018 10:32 am

For my original code, when I dropped the file on the desktop (Windows 10), it would accept the file as named 'C', with no file extension. The formatviewer shows

Format name cfFormat tymed dwAspect lindex
FileGroupDescriptor 49428 TYMED_HGLOBAL 1 0
FileContents 49427 TYMED_HGLOBAL 1 0

After changing the code to:

AddFormat('FileGroupDescriptorW', '');

The formatviewer shows:
Format name cfFormat tymed dwAspect lindex
FileGroupDescriptorW 49429 TYMED_HGLOBAL 1 0
FileContents 49427 TYMED_HGLOBAL 1 0

It still doesn't work with Outlook. An interesting note is that the drop onto the desktop now doesn't work. So changing to FileGroupDescriptorW does have an effect on some programs. The Desktop sure doesn't like it.
thomas@nssco.com
 
Posts: 5
Joined:
Tue May 22, 2018 1:20 pm

Re: Drag to Outlook 2016 doesn't work

Postby thomas@nssco.com » Tue Jun 19, 2018 4:32 pm

Hi Ray, Do you have any other suggestions? Thanks.
thomas@nssco.com
 
Posts: 5
Joined:
Tue May 22, 2018 1:20 pm

Re: Drag to Outlook 2016 doesn't work

Postby Raize Support » Fri Jun 22, 2018 5:36 pm

Hi Thomas,

I'm sending a message to Jim, the architect of the components and I will ask him to take another look.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 622
Joined:
Fri Mar 25, 2011 9:04 pm

Re: Drag to Outlook 2016 doesn't work

Postby thomas@nssco.com » Mon Jul 16, 2018 8:51 am

Hi Ray,

Any word from him?
Thanks,

Thomas
thomas@nssco.com
 
Posts: 5
Joined:
Tue May 22, 2018 1:20 pm


Return to DropMaster

Who is online

Users browsing this forum: No registered users and 0 guests

cron