T
TWF0dA
Hello,
I wasn't getting this error until I threw my code, which initiated/called my
Form to load, into a try/catch statement.
"Current thread must be set to single thread apartment (STA) mode before OLE
calls can be made. Ensure that your Main function has STAThreadAttribute
marked on it."
I don't have a Main function in my code for my COM add-in for Outlook, so
how would I go about fixing this error so that I can load my Form.
Thanks
I wasn't getting this error until I threw my code, which initiated/called my
Form to load, into a try/catch statement.
"Current thread must be set to single thread apartment (STA) mode before OLE
calls can be made. Ensure that your Main function has STAThreadAttribute
marked on it."
I don't have a Main function in my code for my COM add-in for Outlook, so
how would I go about fixing this error so that I can load my Form.
Thanks