Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27059

VS 2010 Convert VBA Outlook GetDefaultFolder code

$
0
0
I am attempting to convert vba to vb.net. What is the syntax to convert the following code?


Current vba:
Code:

oCalendar = Application.Session.GetDefaultFolder(olFolderCalendar)

My attemp vb.net :

Code:

oCalendar = objNS.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar)
when i run this in its place I am getting null reference exception. If you could explain what I need to that would be most helpful


Thank You
Attached Files

Viewing all articles
Browse latest Browse all 27059

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>