How to check any existing ActiveDocument?

For office developers, you might want to check is there any existing active document is opened before you open a document template. What you can do is, check is there any open by using  (Globals.ThisAddIn.Documents.Count > 0). Then close the activeDocument using ActiveDocument.Close(ref object, ref object, ref object). Here is the snippet code that for…

2

Missing "Office = Microsoft.Office.Core" reference?

Missing this reference “Office = Microsoft.Office.Core“?Here is how you can add the particular reference:Step 1: Right-click your projectStep 2: Select “Add reference..“Step 3: Click on the “COM” tabStep 4: Scroll down to select “Microsoft Office 12.0 Object Library“.

6