My DLL library code is as follows:
using System;
using IVisio=Microsoft.Office.Interop.Visio;
namespace Emix
{
public class Visio
{
protected String path;
public Visio(String path)
{
this.path = path;
}
public void open()
{
try
{
IVisio.Document doc = new IVisio.Application().Documents.Add(this.path);
Console.WriteLine("Number of pages: " + doc.Pages.Count);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
However, this code opens the Visio editor and then displays the number of pages in the document.
Is it possible to read this file content without opening the Visio?
If you make the application invisible, you will not see the new instance of Visio opening (there will still be a instance of Visio running, just not a visible one)