Skip to content

Commit b6efda0

Browse files
committed
Export document modules without attributes
1 parent 1cee0fd commit b6efda0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Rubberduck.Core/UI/CodeExplorer/Commands/ExportCommand.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,15 @@ public bool PromptFileNameAndExport(QualifiedModuleName qualifiedModule)
100100
var component = ProjectsProvider.Component(qualifiedModule);
101101
try
102102
{
103-
component.Export(dialog.FileName);
103+
if (component.Type == ComponentType.Document)
104+
{
105+
var path = System.IO.Path.GetDirectoryName(dialog.FileName);
106+
component.ExportAsSourceFile(path);
107+
}
108+
else
109+
{
110+
component.Export(dialog.FileName);
111+
}
104112
}
105113
catch (Exception ex)
106114
{

0 commit comments

Comments
 (0)