This project has moved and is read-only. For the latest updates, please go here.


Apr 6, 2014 at 1:05 PM
Dear Sebastian,

When I try to connect to a running Excel program using Windows.Application(null, piaProxy) I get a "piaProxy does not exist in the current context (CS0103)".
Where am I going wrong, please?

David Hyde

Here is the code:

using System;
using System.Diagnostics;
using NetOffice.VBIDEApi;
using Office = NetOffice.OfficeApi;
using Excel = NetOffice.ExcelApi;

public class ExcelApp
    //protected  myApplication;
    protected Excel.Application myApplication;

    public ExcelApp()

          myApplication = new Excel.Application(null,piaProxy);

Apr 7, 2014 at 8:19 AM
the piaProxy variable is undefined(not created) or not accessible in current code module. you have to make sure the compiler can find the definition.
BTW: NetOffice spend an option for use a running instance:
myApplication =Excel.Application.GetActiveInstance();

Apr 13, 2014 at 1:15 PM
Thank you, that worked. Now I can move onto another question!


David Hyde