Object reference not set to an instance of an object-URGENT

it’s done intentionally.
here’s the ss of comment code:-

This shall i put on default section or variable type…?
i think it’s variable type right…?

1 Like

Under the default value of variable please… !

but it’s showing compiler error

1 Like

Could you please show the error screen shot and also the screenshot after expanding variable type drop-down…

Error is compiler error “new Microsoft.Office.Interop.Outlook.MailItem” ‘MailItem’. is ambiguous in the namespace ‘Microsoft.Office.Interop.Outlook.MailItem’.

1 Like

Okay from where this mailitemoutlook is fetched ?

Hope this what u mean…!!

1 Like

Could you please confirm me one last thing, Does this Get outlook mail item will always return a mail item object ? Is there a chance that it may not return a value ?

I’m not sure.

1 Like

Then please add this to handle such scenarios which you are facing now. As mentioned in below post.

pls help to specify clearly under if condition what should i write in to & vb expression.Thanks

1 Like

Please check this

ok i need to put another if block,
where shall i put the another if block ,under the if block already exist…?(see the tick mark)

1 Like

No you have the assign right which was throwing object reference not set to an instance.

That assign should come inside if block with the condition mentioned in the previous post.

And What’s the condition you are already checking in the already existing if block.


@Nithinkrishna Pls help…!!!

1 Like

This file is only having invoke code, can you send me the file which have this whole logic build in?

Working on it, don’t worry.

1 Like


1 Like

Could you please help me with the name of the workflow in which the code is ?