Hello Otto,
This is the code I use:
- Code: Select all Expand view
jOutlook := TOleAuto():New("Outlook.Application")
jNameSpace := jOutlook:GetNameSpace("MAPI")
jEmail := jOutlook:CreateItem(olMailItem)
jModule := jOutlook:VBProject:VBComponents("Module1")
jOutlook:Run("'"+jModule:Name+".PasteClipboardInNewEmail'")
And this is the error I get:
Application
===========
Path and name: M:\SOFTWARE\JUDA\JUDA_2_D.EXE (32 bits)
Size: ********* bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20190614)
FiveWin version: FWH 24.04
C compiler version: Pelles ISO C Compiler 3.0 (32-bit)
Windows 11 64 Bits, version: 6.2, Build 9200
Time from start: 0 hours 19 mins 53 secs
Error occurred at: 24/07/2024, 15:34:08
Error description: Error Outlook.Application/0 S_OK: VBPROJECT
Args:
Stack Calls
===========
Called from: => TOLEAUTO:VBPROJECT( 0 )
Called from: C:\SOFTWARE\JUDA\PRG\FGEGTL1.PRG => SENDMAIL( 3771 )
Called from: C:\SOFTWARE\JUDA\PRG\DOCWP2.PRG => EMAILDOC( 5457 )
Called from: C:\SOFTWARE\JUDA\PRG\JUDA.PRG => MAILSEND( 3309 )
Called from: C:\SOFTWARE\JUDA\PRG\FGEGTL2.PRG => (b)BUILDBAR1( 3401 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:CLICK( 809 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:LBUTTONUP( 1096 )
Called from: .\source\classes\control.prg => TCONTROL:HANDLEEVENT( 1851 )
Called from: .\source\classes\btnbmp.prg => TBTNBMP:HANDLEEVENT( 2173 )
Called from: .\source\classes\window.prg => _FWH( 1000 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\window.prg => TWINDOW:ACTIVATE( 1114 )
Called from: C:\SOFTWARE\JUDA\PRG\JUDA.PRG => MAIN( 1012 )
Any idea why I get this error?
What do I want to do? I copy the text of a Word-document into the clipboard.
And I want to paste this this text into the body of the new created e-mailmessage.
Thanks a lot.