This commit is contained in:
Lyndon
2017-10-17 11:11:42 +02:00
parent 8fab7c0b52
commit eaa42f2298
3 changed files with 697 additions and 694 deletions

View File

@@ -1975,7 +1975,7 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Chat\ChatController\ChatController.csproj">
<ProjectReference Include="..\..\Chat\ChatController\ChatController.csproj">
<Project>{8a83c4dc-a0b1-4a51-ae1d-366d7a05b298}</Project>
<Name>ChatController</Name>
</ProjectReference>

File diff suppressed because it is too large Load Diff

View File

@@ -1,37 +1,37 @@
using BS.Shared;
using Microsoft.Office.Interop.Word;
//using Microsoft.Office.Interop.Word;
using System.IO;
using Application = Microsoft.Office.Interop.Word.Application;
//using Application = Microsoft.Office.Interop.Word.Application;
namespace BeWo.Office
{
internal class WordListener
{
private Application wordApp;
private Document wordDoc;
private ViewDestination viewDestination;
//private Application wordApp;
//private Document wordDoc;
//private ViewDestination viewDestination;
public WordListener(Application wordApp, Document wordDoc, ViewDestination destination)
{
this.wordApp = wordApp;
this.wordDoc = wordDoc;
viewDestination = destination;
}
//public WordListener(Application wordApp, Document wordDoc, ViewDestination destination)
//{
// this.wordApp = wordApp;
// this.wordDoc = wordDoc;
// viewDestination = destination;
//}
void wordApp_DocumentBeforeSave(Document doc, ref bool saveAsUI, ref bool cancel)
{
if (this.viewDestination == ViewDestination.Edit && Path.Combine(doc.Path, doc.Name).ToLower() == Path.Combine(this.wordDoc.Path, this.wordDoc.Name).ToLower())
{
doc.MailMerge.MainDocumentType = WdMailMergeMainDocType.wdNotAMergeDocument;
}
}
//void wordApp_DocumentBeforeSave(Document doc, ref bool saveAsUI, ref bool cancel)
//{
// if (this.viewDestination == ViewDestination.Edit && Path.Combine(doc.Path, doc.Name).ToLower() == Path.Combine(this.wordDoc.Path, this.wordDoc.Name).ToLower())
// {
// doc.MailMerge.MainDocumentType = WdMailMergeMainDocType.wdNotAMergeDocument;
// }
//}
private void Dispose()
{
wordApp = null;
wordDoc = null;
//private void Dispose()
//{
// wordApp = null;
// wordDoc = null;
OfficeManager.DeleteTempFiles();
}
// OfficeManager.DeleteTempFiles();
//}
}
}