I get page cannot be displayed error when I run WebQuerySave agent

I have a very simple agent where i am using few print statements to send HTML to browser.

Agent Code

Sub Initialize

Print |<H1> Bye User</H1>|

End Sub

Now i want to run this agent when a form is Saved so I am calling it in WebQuerySave event of the form as follows:

@Command([ToolsRunMacro]; “(Simple)”)

But when i try to open the form in Browser and click on Save button which has @command([fileSave]) code, I get “Page Cannot be displayed error” and the URL on the browser shows “http://localhost/BACKUP/SendMail10.nsf/Run?OpenForm” .

Can anybody tell me what is wrong with my approach?

Thanks,

Subject: I get page cannot be displayed error when I run WebQuerySave agent

The HTML should be inside braces, like below:

Print |H1>Bye User

]|

HTH
Adi

Subject: RE: I get page cannot be displayed error when I run WebQuerySave agent

Still does not work. I am working on 5.08 (R5) version by the way. Will that make any difference?Thanks,

Subject: RE: I get page cannot be displayed error when I run WebQuerySave agent

Did you check the server’s log for error messages?I expect the agent is set to run on selected documents; change it to run on all documents (if you were using a later version I would say to run on None, but I don’t know whether that’s a choice in R5).

Subject: RE: I get page cannot be displayed error when I run WebQuerySave agent

I realized that the error was because of the fact that the agent was not shared. I made the agent shared, but now i get a blank page. I thought i was supposed to see the HTML statements i passed in the Print statement.Thanks,

Subject: RE: I get page cannot be displayed error when I run WebQuerySave agent

Yes, that is what’s supposed to happen. Did you view source?