3 Replies Latest reply: Oct 20, 2010 4:45 AM by Shubhasheesh Chakraverty RSS

    Macro for export to png not working fully

    Shubhasheesh Chakraverty

      Dear forum,

      I'm writing this macro to export a gauge chart into png image for all 12 months but it is stoping after 1 month only

      sub exportpng
      sheetobjects = ActiveDocument.ActiveSheet.GetSheetObjects
      for each shobj in sheetobjects
      objtype = shobj.GetObjectType
      if(objtype = 22) then
      set monthlb = ActiveDocument.GetSheetObject("LB07")
      months = monthlb.GetPossibleValues

      for each val in months
      ActiveDocument.Fields("month").Select val
      'bitmapfilename = ImgFolder & "" & shobj.GetCaption.Name.v & "_" & val & ".gif" // this will generate file name
      shobj.ExportBitmapToFile bitmapfilename

      end if
      end sub


      Can anyone help where is the problem.