Skip to content

Commit 96c152e

Browse files
authored
Merge pull request #3784 from MDoerner/FixPowerPointApp
Fix power point app
2 parents 6e1b8d6 + c9c2e1f commit 96c152e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Rubberduck.VBEEditor/Application/PowerPointApp.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ public class PowerPointApp : HostApplicationBase<Microsoft.Office.Interop.PowerP
66
{
77
private readonly IVBE _vbe;
88

9-
public PowerPointApp(IVBE vbe) : base("PowerPoint") { }
9+
public PowerPointApp(IVBE vbe) : base(vbe, "PowerPoint")
10+
{
11+
_vbe = vbe;
12+
}
1013

1114
public override void Run(dynamic declaration)
1215
{

Rubberduck.VBEEditor/SafeComWrappers/VBA/VBE.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ public IHostApplication HostApplication()
187187
}
188188

189189
var host = Path.GetFileName(System.Windows.Forms.Application.ExecutablePath).ToUpperInvariant();
190-
//This needs the VBE as a ctor argument.
191-
if (host.Equals("SLDWORKS.EXE"))
190+
//These need the VBE as a ctor argument.
191+
if (host.Equals("SLDWORKS.EXE") || host.Equals("POWERPNT.EXE"))
192192
{
193-
return new SolidWorksApp(this);
193+
return (IHostApplication)Activator.CreateInstance(HostAppMap[host], this);
194194
}
195195
//The rest don't.
196196
if (HostAppMap.ContainsKey(host))

0 commit comments

Comments
 (0)