Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #12083 > unrolled thread

Drag Outlook message into Cavo application

Started bySjonnie D <sjonnied@gmail.com>
First post2018-10-24 07:51 -0700
Last post2018-11-01 02:40 -0700
Articles 15 — 6 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Drag Outlook message into Cavo application Sjonnie D <sjonnied@gmail.com> - 2018-10-24 07:51 -0700
    Re: Drag Outlook message into Cavo application BenWoestenburg@ziggo.nl - 2018-10-25 03:42 -0700
      Re: Drag Outlook message into Cavo application Sjonnie D <sjonnied@gmail.com> - 2018-10-25 05:30 -0700
      Re: Drag Outlook message into Cavo application "Wolfgang Riedmann" <wriedmann@gmail.com> - 2019-01-14 09:29 +0100
        Re: Drag Outlook message into Cavo application Gerhard Bunzel <g.bunzel@domonet.de> - 2019-01-27 16:34 +0100
          Re: Drag Outlook message into Cavo application "Wolfgang Riedmann" <wriedmann@gmail.com> - 2019-01-28 07:51 +0100
            Re: Drag Outlook message into Cavo application szepligeti@gmail.com - 2019-01-28 07:15 -0800
              Re: Drag Outlook message into Cavo application "Wolfgang Riedmann" <wriedmann@gmail.com> - 2019-01-29 04:48 +0100
                Re: Drag Outlook message into Cavo application szepligeti@gmail.com - 2019-01-28 23:15 -0800
                  Re: Drag Outlook message into Cavo application "Wolfgang Riedmann" <wriedmann@gmail.com> - 2019-01-30 05:06 +0100
                    Re: Drag Outlook message into Cavo application szepligeti@gmail.com - 2019-01-29 23:34 -0800
          Re: Drag Outlook message into Cavo application Sjonnie D <sjonnied@gmail.com> - 2019-02-07 08:31 -0800
    Re: Drag Outlook message into Cavo application BenWoestenburg@ziggo.nl - 2018-10-25 05:46 -0700
      Re: Drag Outlook message into Cavo application Mariette <mariette@kleijn.com> - 2018-10-29 08:36 -0700
        Re: Drag Outlook message into Cavo application BenWoestenburg@ziggo.nl - 2018-11-01 02:40 -0700

#12083 — Drag Outlook message into Cavo application

FromSjonnie D <sjonnied@gmail.com>
Date2018-10-24 07:51 -0700
SubjectDrag Outlook message into Cavo application
Message-ID<6aa814d4-1caf-47e9-82e8-ac37ac941a0f@googlegroups.com>
Hi all,
We are changing our mailclients from Thunderbird to Outlook 2016. In outlook we could very ease drag an emailmessage into our Cavo Application.
For Outlook we need to use the OleDragEvent. Unfortunately, we are unable to save the file from the ole object in Cavo. 
We have a working example in C#, but we do not manage to pass the OleDragEvent into C#, for further processing. The file must be dropped on a Cavo window.

Is there anybody here who has this working or who can give us clue?

Kind regards,
John Dekker

[toc] | [next] | [standalone]


#12084

FromBenWoestenburg@ziggo.nl
Date2018-10-25 03:42 -0700
Message-ID<d5a7f5e3-9c42-48f8-9266-7edc26284543@googlegroups.com>
In reply to#12083
Hello John,

I have written this some time ago:

METHOD OLEDrop( oOLEDragEvent) CLASS ScrnKlantStuk

LOCAL oTreeViewItem AS TreeViewItem
LOCAL oPoint AS Point
LOCAL oScrnKlantStukMail AS ScrnKlantStukMail 
LOCAL oScrnSaveMail AS ScrnSaveMail 

LOCAL oMails AS OutlookSelection
LOCAL oMail AS OutlookMailItem
LOCAL nTel AS WORD
LOCAL lCont AS LOGIC

IF oOLEDragEvent:ObjectName=="Outlook"
	oPoint:=oOLEDragEvent:Position

	//in listview?
	lCont:=( Between ( oPoint:x , SELF:ListView:Origin:x ,SELF:ListView:Origin:x + SELF:ListView:Size:width ) .AND. ;
				Between ( oPoint:y , SELF:ListView:Origin:y , SELF:ListView:Origin:y + SELF:ListView:Size:Height ))

	//nee in treeview?
	IF ( !lCont)
		oTreeViewItem:=SELF:Treeview:GetItemAtPosition( oPoint)
		lCont:=!Empty( oTreeViewItem)
	ENDIF

	//1 van de 2
	IF lCont
		oOLEDragEvent:effect:=DROPEFFECT_COPY

		oScrnKlantStukMail:=ScrnKlantStukMail{ SELF,,, {SELF}}
		oScrnKlantStukMail:OutLook:=Outlook{}

		IF ( !oScrnKlantStukMail:OutLook:finit)
			FoutBoks( SELF, "Openen Outlook", "Outlook kan niet worden geopend, E-mail kan niet worden toegevoegd aan het dossier")
		ELSE
			oMails:=oScrnKlantStukMail:OutLook:ActiveExplorer:Selection
			FOR nTel:=1 TO oMails:Count 
				oMail:=oScrnKlantStukMail:OutLook:ActiveExplorer:Selection:Item( nTel)

				oScrnKlantStukMail:BuildListviewLine( oMail, TRUE)
				IF ( oMail:Attachments:Count > 0)
					oScrnSaveMail:=ScrnSaveMail{ SELF}
					oScrnSaveMail:Show()

					IF ( oScrnSaveMail:Result==1)
						IF ( oScrnSaveMail:SaveMail)
							oScrnKlantStukMail:ToevStuk( oMail)
						ENDIF
						IF ( oScrnSaveMail:SaveBijl)
							oScrnKlantStukMail:ToevBijl( oMail)
						ENDIF
					ENDIF

				ELSE
					oScrnKlantStukMail:ToevStuk( oMail)
				ENDIF
			NEXT 
		ENDIF

		oScrnKlantStukMail:EndWindow()
	ENDIF
ENDIF

RETURN TRUE

The mails are dropped on a listview. oScrnKlantStukMail is only created to use some of its procedures; it is never shown.


Regards.

Ben Woestenburg






Op woensdag 24 oktober 2018 16:51:45 UTC+2 schreef Sjonnie D:
> Hi all,
> We are changing our mailclients from Thunderbird to Outlook 2016. In outlook we could very ease drag an emailmessage into our Cavo Application.
> For Outlook we need to use the OleDragEvent. Unfortunately, we are unable to save the file from the ole object in Cavo. 
> We have a working example in C#, but we do not manage to pass the OleDragEvent into C#, for further processing. The file must be dropped on a Cavo window.
> 
> Is there anybody here who has this working or who can give us clue?
> 
> Kind regards,
> John Dekker

[toc] | [prev] | [next] | [standalone]


#12085

FromSjonnie D <sjonnied@gmail.com>
Date2018-10-25 05:30 -0700
Message-ID<7c6e1b14-36a4-4717-80c8-ee3dc069e5f5@googlegroups.com>
In reply to#12084
Hi Ben,
Thank you, this is what we need.

What do we need to include to have the class Outlook{} available?
oScrnKlantStukMail:OutLook:=Outlook{}

Regards,
John

[toc] | [prev] | [next] | [standalone]


#12163

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2019-01-14 09:29 +0100
Message-ID<ga2vjtF6t0tU1@mid.individual.net>
In reply to#12084
Hi Ben,

I have now tried to implement Outlook Drag&Drop into my application.

As start base, I have used the OleCont sample. But unfortunately I have
not been able to make the application accept the Drop operation from
Outlook.
In the window init method, the call 
  self:EnableOleDropTarget(TRUE)
was already there, but when dragging from Outlook the mouse pointer
shows the "disabled" icon, and the drop event does not even arrives at
the window level.

Is there anything I can do?

Microsoft documentation is not very helpful...

Thank you very much!

Wolfgang


BenWoestenburg@ziggo.nl wrote:

> Hello John,
> 
> I have written this some time ago:
> 
> METHOD OLEDrop( oOLEDragEvent) CLASS ScrnKlantStuk
> 
> LOCAL oTreeViewItem AS TreeViewItem
> LOCAL oPoint AS Point
> LOCAL oScrnKlantStukMail AS ScrnKlantStukMail 
> LOCAL oScrnSaveMail AS ScrnSaveMail 
> 
> LOCAL oMails AS OutlookSelection
> LOCAL oMail AS OutlookMailItem
> LOCAL nTel AS WORD
> LOCAL lCont AS LOGIC
> 
> IF oOLEDragEvent:ObjectName=="Outlook"
> 	oPoint:=oOLEDragEvent:Position
> 
> 	//in listview?
> 	lCont:=( Between ( oPoint:x , SELF:ListView:Origin:x
> ,SELF:ListView:Origin:x + SELF:ListView:Size:width ) .AND. ;
> Between ( oPoint:y , SELF:ListView:Origin:y , SELF:ListView:Origin:y
> + SELF:ListView:Size:Height ))
> 
> 	//nee in treeview?
> 	IF ( !lCont)
> 		oTreeViewItem:=SELF:Treeview:GetItemAtPosition( oPoint)
> 		lCont:=!Empty( oTreeViewItem)
> 	ENDIF
> 
> 	//1 van de 2
> 	IF lCont
> 		oOLEDragEvent:effect:=DROPEFFECT_COPY
> 
> 		oScrnKlantStukMail:=ScrnKlantStukMail{ SELF,,, {SELF}}
> 		oScrnKlantStukMail:OutLook:=Outlook{}
> 
> 		IF ( !oScrnKlantStukMail:OutLook:finit)
> 			FoutBoks( SELF, "Openen Outlook", "Outlook kan niet worden
> geopend, E-mail kan niet worden toegevoegd aan het dossier") 		ELSE
> 			oMails:=oScrnKlantStukMail:OutLook:ActiveExplorer:Selection
> 			FOR nTel:=1 TO oMails:Count 
> 				oMail:=oScrnKlantStukMail:OutLook:ActiveExplorer:Selection:Item(
> nTel)
> 
> 				oScrnKlantStukMail:BuildListviewLine( oMail, TRUE)
> 				IF ( oMail:Attachments:Count > 0)
> 					oScrnSaveMail:=ScrnSaveMail{ SELF}
> 					oScrnSaveMail:Show()
> 
> 					IF ( oScrnSaveMail:Result==1)
> 						IF ( oScrnSaveMail:SaveMail)
> 							oScrnKlantStukMail:ToevStuk( oMail)
> 						ENDIF
> 						IF ( oScrnSaveMail:SaveBijl)
> 							oScrnKlantStukMail:ToevBijl( oMail)
> 						ENDIF
> 					ENDIF
> 
> 				ELSE
> 					oScrnKlantStukMail:ToevStuk( oMail)
> 				ENDIF
> 			NEXT 
> 		ENDIF
> 
> 		oScrnKlantStukMail:EndWindow()
> 	ENDIF
> ENDIF
> 
> RETURN TRUE
> 
> The mails are dropped on a listview. oScrnKlantStukMail is only
> created to use some of its procedures; it is never shown.
> 
> 
> Regards.
> 
> Ben Woestenburg
> 
> 
> 
> 
> 
> 
> Op woensdag 24 oktober 2018 16:51:45 UTC+2 schreef Sjonnie D:
> > Hi all,
> > We are changing our mailclients from Thunderbird to Outlook 2016.
> > In outlook we could very ease drag an emailmessage into our Cavo
> > Application.  For Outlook we need to use the OleDragEvent.
> > Unfortunately, we are unable to save the file from the ole object
> > in Cavo.  We have a working example in C#, but we do not manage to
> > pass the OleDragEvent into C#, for further processing. The file
> > must be dropped on a Cavo window.
> > 
> > Is there anybody here who has this working or who can give us clue?
> > 
> > Kind regards,
> > John Dekker



-- 

[toc] | [prev] | [next] | [standalone]


#12180

FromGerhard Bunzel <g.bunzel@domonet.de>
Date2019-01-27 16:34 +0100
Message-ID<q2kj1u$af2$1@news-1.m-online.net>
In reply to#12163
Hi Wolfgang,

I have done a test with that Outlook add-in:
https://tonyfederer.github.io/OutlookFileDrag/

It's working fine with the VO method :Drop(oDropEvent).

HTH

Gerhard Bunzel



Am 14.01.2019 um 09:29 schrieb Wolfgang Riedmann:
> Hi Ben,
> 
> I have now tried to implement Outlook Drag&Drop into my application.
> 
> As start base, I have used the OleCont sample. But unfortunately I have
> not been able to make the application accept the Drop operation from
> Outlook.
> In the window init method, the call
>    self:EnableOleDropTarget(TRUE)
> was already there, but when dragging from Outlook the mouse pointer
> shows the "disabled" icon, and the drop event does not even arrives at
> the window level.
> 
> Is there anything I can do?
> 
> Microsoft documentation is not very helpful...
> 
> Thank you very much!
> 
> Wolfgang
> 
> 

[toc] | [prev] | [next] | [standalone]


#12181

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2019-01-28 07:51 +0100
Message-ID<gb7n3tF9hcaU1@mid.individual.net>
In reply to#12180
Hi Gerhard,

> I have done a test with that Outlook add-in:
> https://tonyfederer.github.io/OutlookFileDrag/
> 
> It's working fine with the VO method :Drop(oDropEvent).

thank you very much! I had found it a few days ago and installed it not
only onmy PC, but also on some customers computers, and it works very
well from Outlook 2010 to Outlook 2019.

Wolfgang


-- 

[toc] | [prev] | [next] | [standalone]


#12182

Fromszepligeti@gmail.com
Date2019-01-28 07:15 -0800
Message-ID<b21c66b0-16cd-41df-8d5f-2222850475fb@googlegroups.com>
In reply to#12181
Hi Wolfgang,

Could you send me a short program detail about this?

Thanks.

Szepligeti

[toc] | [prev] | [next] | [standalone]


#12183

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2019-01-29 04:48 +0100
Message-ID<gba0ooFp46tU1@mid.individual.net>
In reply to#12182
Hi Szepligeti,


> Could you send me a short program detail about this?

this Outlook extension simply transforms the Outlook OLE Drag&Drop into
a standard Windows file Drag&Drop procedure, so you can receive the
files directly in the Drop() event method of the Window class.

For more details please see the project page: 
https://tonyfederer.github.io/OutlookFileDrag/

And if you find it useful, please don't forget to make a donation to
the author. Who works, should also eat.

Wolfgang

-- 

[toc] | [prev] | [next] | [standalone]


#12184

Fromszepligeti@gmail.com
Date2019-01-28 23:15 -0800
Message-ID<b4f5e718-87ea-419c-abba-3138b6642ca3@googlegroups.com>
In reply to#12183
Hi Wolfgang,

I mean, I wanted a VO example detail.
How did you save the email?

Szepligeti

[toc] | [prev] | [next] | [standalone]


#12186

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2019-01-30 05:06 +0100
Message-ID<gbcm73Fcg3hU1@mid.individual.net>
In reply to#12184
Hi Szepligeti,

> I mean, I wanted a VO example detail.
> How did you save the email?

if you drag the email to your VO application, it is simply a .msg file.

You can take the file and copy it to another location if needed:

method Drop( oEvent ) class DokWindow
	local nI		as dword
	local oFS		as FileSpec
	local aFiles	as array
	
	super:Drop( oEvent )
	if oEvent:FileCount > 0
		aFiles			:= {}
		for nI := 1 upto oEvent:FileCount
			oFS			:= FileSpec{ oEvent:FileName( nI ) }
			AAdd( aFiles, oFS:FullPath )
		next
		self:DropFiles( aFiles )
	endif

	return nil               
	
method DropFiles( aFiles as array ) as logic pascal class DokWindow
	local nI			as dword
	local nLen			as dword
	local cSource		as string
	local cTarget		as string
	 
	nLen			:= ALen( aFiles )
	for nI := 1 upto nLen
		cSource	:= aFiles[nI]
		cTarget	:= self:DokFolder + GetFileNameFromPath( cSource ) 
		CopyFileEx( cSource, cTarget ) 
	next
	
	return true

I have removed all error handling from these methods.
CopyFileEx() is a function that copies a file and shows a progress box.

Wolfgang

-- 

[toc] | [prev] | [next] | [standalone]


#12187

Fromszepligeti@gmail.com
Date2019-01-29 23:34 -0800
Message-ID<23d06677-a362-4d7c-8440-1aca31cca168@googlegroups.com>
In reply to#12186
Hi Wolfgang,

Perfect!
Thank you very much!

Szepligeti

[toc] | [prev] | [next] | [standalone]


#12213

FromSjonnie D <sjonnied@gmail.com>
Date2019-02-07 08:31 -0800
Message-ID<484a4046-bf0e-4f3e-8848-083bafd24cac@googlegroups.com>
In reply to#12180
This works perfect. Thank you very much.
Regards,
John

[toc] | [prev] | [next] | [standalone]


#12086

FromBenWoestenburg@ziggo.nl
Date2018-10-25 05:46 -0700
Message-ID<748237b5-cd87-4465-b941-c86f1ba9ee55@googlegroups.com>
In reply to#12083
You need to generate a library for Outlook through Automation Server in the menu Tools. Include that library in the application.

[toc] | [prev] | [next] | [standalone]


#12090

FromMariette <mariette@kleijn.com>
Date2018-10-29 08:36 -0700
Message-ID<8546cc23-77de-4439-9dfa-5ff8a73262f4@googlegroups.com>
In reply to#12086
Op donderdag 25 oktober 2018 14:46:28 UTC+2 schreef BenWoes...@ziggo.nl:
> You need to generate a library for Outlook through Automation Server in the menu Tools. Include that library in the application.

Hi Ben,
Thank you again. We now can drop an outlook-mail and save it in our Cavo system.

But if I drop only an attachment of an outlook mail, the OLEDragEvent:ObjectName is NOT "Outlook". 
Do you know how I can see if the OLEDragEvent is comming from OUTLOOk or from e.g. the explorer ? (If from explorer, than I drop it with Drop() instead of  OLEdrop())

Regards,

Mariette

[toc] | [prev] | [next] | [standalone]


#12101

FromBenWoestenburg@ziggo.nl
Date2018-11-01 02:40 -0700
Message-ID<5057c967-8661-4ba3-90da-075522bb4577@googlegroups.com>
In reply to#12090
No Mariette, I don't.

Op maandag 29 oktober 2018 16:36:10 UTC+1 schreef Mariette:
> Op donderdag 25 oktober 2018 14:46:28 UTC+2 schreef BenWoes...@ziggo.nl:
> > You need to generate a library for Outlook through Automation Server in the menu Tools. Include that library in the application.
> 
> Hi Ben,
> Thank you again. We now can drop an outlook-mail and save it in our Cavo system.
> 
> But if I drop only an attachment of an outlook mail, the OLEDragEvent:ObjectName is NOT "Outlook". 
> Do you know how I can see if the OLEDragEvent is comming from OUTLOOk or from e.g. the explorer ? (If from explorer, than I drop it with Drop() instead of  OLEdrop())
> 
> Regards,
> 
> Mariette

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web