Skip to content

Commit 5cae35b

Browse files
committed
Add auto macros for PPT because ... the ducky sees all and knows all?
1 parent 35b1944 commit 5cae35b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Rubberduck.VBEditor.VBA/SafeComWrappers/Application/ExcelApp.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public ExcelApp(IVBE vbe) : base(vbe, "Excel", true)
1515

1616
public override IEnumerable<HostAutoMacro> AutoMacroIdentifiers => new HostAutoMacro[]
1717
{
18-
new HostAutoMacro(new[] {ComponentType.StandardModule}, true, null, "auto_open"),
19-
new HostAutoMacro(new[] {ComponentType.StandardModule}, true, null, "auto_close")
18+
new HostAutoMacro(new[] {ComponentType.StandardModule}, true, null, "Auto_Open"),
19+
new HostAutoMacro(new[] {ComponentType.StandardModule}, true, null, "Auto_Close")
2020
};
2121
}
2222
}
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
using Rubberduck.VBEditor.SafeComWrappers.Abstract;
1+
using System.Collections.Generic;
2+
using Rubberduck.VBEditor.SafeComWrappers.Abstract;
23

34
// ReSharper disable once CheckNamespace - Special dispensation due to conflicting file vs namespace priorities
45
namespace Rubberduck.VBEditor.SafeComWrappers.VBA
56
{
67
public class PowerPointApp : HostApplicationBase<Microsoft.Office.Interop.PowerPoint.Application>
78
{
89
public PowerPointApp(IVBE vbe) : base(vbe, "PowerPoint") { }
10+
11+
public override IEnumerable<HostAutoMacro> AutoMacroIdentifiers => new HostAutoMacro[]
12+
{
13+
// Technically, those are only run only if it's an add-in, not opened directly
14+
new HostAutoMacro(new[] {ComponentType.StandardModule}, false, null, "Auto_Open"),
15+
new HostAutoMacro(new[] {ComponentType.StandardModule}, false, null, "Auto_Close")
16+
};
917
}
1018
}

0 commit comments

Comments
 (0)