It’s easy to create a web office application with the EDraw Office Viewer Component. The component has the good support to do the VBA. You can write the Javascript or the vbscript to realize it. Follow the sample codes.

<script language=”JScript” for=WebOffice event=”OnDocumentOpened(vFileName,vObject)”>
OnDocumentOpened(vFileName,vObject); //opened document event
</script>

<script language=”JScript” for=WebOffice event=”OnDocumentClosed()”>
OnDocumentClosed(); //Closed document event
</script>
<script language=javascript>
function OnDocumentOpened(vFileName,vObject)
{…}

function Load(){
webform.OfficeViewer.Open=”<%=mFileName%>”;
}

function UnLoad(){
try{
webform.OfficeViewer.Close();
}catch(e){}
}

function LoadDocument(){
webform.OfficeViewer.OpenOfficeFileDialog();
}

function SaveDocument(){
webform.OfficeViewer.Save();
}
//Returns/sets whether toolbars should be displayed.
function WebToolBars(Visible){
try{
webform.OfficeViewer.ToolBars=Visible;
}catch(e){}
}
//Returns/sets whether a menu bar should be displayed.
function WebMenuBar(Visible){
try{
webform.OfficeViewer.MenuBar=Visible;
}catch(e){}
}

//Shows/Hides the specified toolbar.
function WebToolsVisible(ToolName,Visible){
try{
webform.OfficeViewer.ActiveDocument.CommandBars(ToolName).Visible = Visible;
}catch(e){}
}