0
Views
3
Comments
Problem creating an extension
Question
Hi,

I have created an extension that opens a word document, save that document and close the word application.

Inside the document I have a Macro that runs when document is open (in order to make this I've created a Macro called AutoOpen), but my extension stops when the document is opened given me the error:

"Object reference not set to an instance of an object." in Service Studio and
"Memória insuficiente. Guarde o documento agora." in Visual Studio

But the fact is that I have enough memory.

I've attached my extension to topic.

Can someone helpme?
OpenCloseWordDoc.xif
2011-08-23 22-04-05
Tiago Simões
Staff
Hi Claudio,

This does not seem to be a problem with the OutSystems Platform, but of running macros in MS Word when using the ASP.Net account. You might want to try any of these 2 options:
1 - Either use this workaround (you might need to do the impersonation inside the extension or use the Run As functionality in OutSystems Service Center)
2 - or you can try to remove the macro and put all its code in the extension itself.

Cheers,
Tiago Simões
2011-08-23 22-04-05
Tiago Simões
Staff
I guess you know this already, but you would also need to have MS word installed on the server.

Cheers,
Tiago Simões
2021-09-30 06-07-41
Cláudio Oliveira
Thank's Tiago, my extension is now working fine, I have created a new user with admin previlege and post that user in run as. I also include the word macro code in the extension. Now I don't need word macros any more, making my application more safe.

Thank you again.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.