Skip to content

Commit d97aa9c

Browse files
committed
Adds Unit Testing for MSProject
Application.Run() does exist but doesn't seem to work, so using Application.Macro() instead.
1 parent bcca242 commit d97aa9c

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Rubberduck.VBEEditor/Extensions/VbeExtensions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public static IHostApplication HostApplication(this VBE vbe)
6666
return new PowerPointApp();
6767
case "Microsoft Outlook":
6868
return new OutlookApp();
69+
case "Microsoft Project":
70+
return new ProjectApp();
6971
case "Microsoft Publisher":
7072
return new PublisherApp();
7173
case "Microsoft Visio":
@@ -94,6 +96,8 @@ public static IHostApplication HostApplication(this VBE vbe)
9496
return new PowerPointApp();
9597
case "Outlook":
9698
return new OutlookApp();
99+
case "MSProject":
100+
return new ProjectApp();
97101
case "Publisher":
98102
return new PublisherApp();
99103
case "Visio":

Rubberduck.VBEEditor/Rubberduck.VBEditor.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@
4242
<EmbedInteropTypes>True</EmbedInteropTypes>
4343
<HintPath>..\libs\Microsoft.Office.Interop.Excel.dll</HintPath>
4444
</Reference>
45+
<Reference Include="Microsoft.Office.Interop.MSProject, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
46+
<SpecificVersion>False</SpecificVersion>
47+
<EmbedInteropTypes>True</EmbedInteropTypes>
48+
<HintPath>..\libs\Microsoft.Office.Interop.MSProject.dll</HintPath>
49+
</Reference>
4550
<Reference Include="Microsoft.Office.Interop.Outlook, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
4651
<SpecificVersion>False</SpecificVersion>
4752
<EmbedInteropTypes>True</EmbedInteropTypes>
@@ -114,6 +119,7 @@
114119
</Compile>
115120
<Compile Include="VBEHost\AccessApp.cs" />
116121
<Compile Include="VBEHost\CorelDRAWApp.cs" />
122+
<Compile Include="VBEHost\ProjectApp.cs" />
117123
<Compile Include="VBEHost\ExcelApp.cs" />
118124
<Compile Include="VBEHost\FallbackApp.cs" />
119125
<Compile Include="VBEHost\HostApplicationBase.cs" />
763 KB
Binary file not shown.

0 commit comments

Comments
 (0)