xsharp.eu • Trying send mails and attachments via Outlook - Page 3
Page 3 of 3

Trying send mails and attachments via Outlook

Posted: Sun Mar 17, 2019 5:30 pm
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

Trying send mails and attachments via Outlook

Posted: Sun Mar 17, 2019 8:00 pm
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

Trying send mails and attachments via Outlook

Posted: Mon Mar 18, 2019 5:03 am
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?

Trying send mails and attachments via Outlook

Posted: Mon Mar 18, 2019 8:00 am
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