Trying send mails and attachments via Outlook

We encourage new members to introduce themselves here. Get to know one another and share your interests.
rn@warner-it.com
Posts: 46
Joined: Mon Mar 04, 2019 4:41 pm

Trying send mails and attachments via Outlook

Post by rn@warner-it.com »

Hi Chris
As an Info I got the Outlook to run as you suggested in 32 bit mode the only thing I still got an error when I open the mail but I can read it. This morning when I wanted to look at my mails I could not start Outlook anymore I am using the 365 version. I have just had to create a new Outlook Profile. Tomorrow I am going to try and retrieve some of my mails from the old Profile I have to google and find out how to repair the old profile. Yesterday I sent you a mail regarding the TRY and Catch the problem is that I have tried all variants of
what you Wolfgang and John said but I cannot fix this problem because when I try to do the same as Catch system.Exception for the TRY I get other errors. These errors I sent you and Johan. Can you please have a look and also I am currently writing a 64 bit app ion X# how and where do I get the Outlook DLL. AS I told you Yesterday in my mail I am working with Visual studio 2017 Community version and the path you sent me or the Outlook.Dll I do not have I am using officially Office 365 which I purchased from Microsoft over the Internet that I pay Yearly for the Licence. Anyway Chris I would appreciate your comments and suggestions to these problems because I have not yet solved them.
TRY
SELF:da:Update(SELF:ds, selectTable) // selectTable is a GLOBAL, assigned in InitDGVMan
*Messagebox.show(row:Item[3]:ToString()+", "+row:RowState:ToString())
CATCH ex AS System.Execption
messageBox.Show("Update failed")
END TRY
Thanks again
Raymond
User avatar
robert
Posts: 4558
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Trying send mails and attachments via Outlook

Post by robert »

Raymond,
PMFJI I think you have chosen a quite complicated project for a first attempt with X#, especially because you are dealing with other components and because you are also trying to do things with 64 bits as well.
My advice would be to start to learn a new product with something simple first.
Even experienced developers would have problems with this.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4978
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Trying send mails and attachments via Outlook

Post by Chris »

Raymond, I agree with Robert, it is better to do some simpler tests first, to get used with the new language and environment, before you dive into communicating with Office, which is more advanced .Net stuff.

About the compiler error, unfortunately as I told you Wolfgang made a very small typo, he told you to use System.Exeption, instead of System.Exception. Did you try to specify the code like that as we told you:

CATCH ex AS System.Exception

If you did that and still get compiler errors, can you please show us the exact error messages?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
MathiasHakansson
Posts: 50
Joined: Fri Feb 16, 2018 7:52 am

Trying send mails and attachments via Outlook

Post by MathiasHakansson »

I have been trouble using the MAPI-functions when running through the debugger. The release version of the application works as expected. The compilation errors will have to be solved first though.

/Mathias
Post Reply