2 Replies Latest reply: Jan 28, 2015 2:06 PM by Normélio Junior RSS

    Publisher Macro Failure

    Tom Jones

      Hi,

       

      I have several straight charts that have total fields - I have a macro that will read and sum the totals from each chart upon a variable change.  This works fine locally, but not when the document is published.  The macro is below - the document macro security is set to allow system access - I have other macros that are running fine.  Are any of the actions in the macro restricted by the publisher?  Are users unable to write to variables?

       

      Thanks in advance.

       

      Sub get_total_2

       

      sheetObj=Array("CH08","CH17","CH12")

       

      for i=0 to UBound(sheetObj)

      set obj= ActiveDocument.GetSheetObject(sheetObj(i))

       

        rowCount = obj.GetRowCount-1

        colCount = obj.GetColumnCount-1

        cellVar = cellVar + CDbl(ActiveDocument.GetSheetObject(sheetObj(i)).GetCell(rowCount,colCount).text)

       

      next

        ActiveDocument.Variables("vVarTotal").SetContent cellVar, True

       

      End Sub