DocTo icon indicating copy to clipboard operation
DocTo copied to clipboard

Disable Autorun on Excel

Open tobya opened this issue 1 year ago • 2 comments

Word autorun is now disabled by default

  • #205

Shoudl also be possible to disable on Excel.

Raised by

  • #190
  • #195

tobya avatar Sep 29 '23 14:09 tobya

@Darthmineboy Can you provide me with an xls spreadsheet that has an autorun macro.

I dont use excel much.

tobya avatar Sep 30 '23 10:09 tobya

@tobya for security it may be better if I explain how, instead of sharing a macro document :)

  1. First enable developer ribbon, go to File > Options > Customize Ribbon > Enable Developer ribbon
  2. Then go to developer ribbon and select view code
  3. To ThisWorkbook I added Workbook_Open sub that overwrites a cell
Private Sub Workbook_Open()
    Cells(2, 1).Value = "Macros are enabled"
End Sub
  1. Save file as Excel Macro-Enabled Workbook
  2. Close file and open, after enabling macros (security warning) the 2nd row should show "Macros are enabled"
  3. Docto however runs the macro (without security warning) docto -XL -f macro.xlsm -OX .pdf -T xlpdf

Darthmineboy avatar Oct 03 '23 07:10 Darthmineboy