1 Reply Latest reply on May 20, 2009 7:49 AM by Andreas Jansson

    Object reference not set to an instance of an object. InDesign.Image

    ChamnanKh

      Trying to make C# application for creating Library.

      But, now get stuck with interface InDesign.Image.

       

      System.NullReferenceException was unhandled
        Message="Object reference not set to an instance of an object."

       

      What is the right way to use this interface in C#?

       

      using System;
      using InDesign;

       

      namespace TestingInteropInDesign
      {
          class Program
          {
              static void Main(string[] args)
              {
                 Image img = null;
                  object obj = img.Place("C:\\mypic.jpg", false);
                  Console.ReadKey();
              }
          }
      }