C# InDesign instance - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

C# InDesign instance

ShayneShayne Posts: 1Member
[b][red]This message was edited by Shayne at 2003-5-7 8:43:32[/red][/b][hr]
[b][red]This message was edited by Shayne at 2003-5-7 8:32:26[/red][/b][hr]
Does anybody know how to create an instance for an InDesign Application?
The following VB Code works:

Private myInDesign As InDesign.Application
Set myInDesign = CreateObject("InDesign.Application")

I'm trying convert a VB program the automates Adobe InDesign into C# syntax. I tried the following code:

InDesign.Application indApp;
indApp = new InDesign.Application();

Which generates an error - "Cannot create an instance of the abstract class interface or 'InDesign.Application'".

If anybody out there knows how to connect C# to InDesign, I would appreciate if you could let me know how? Thank you







Comments

  • suriyawnmsuriyawnm Posts: 1Member
    For creating an instance in C# for Indesign. Use the below coding:

    Indesign.Application InDApp = (InDesign.Application)Activator.CreateInstance(Type.GetTypeFromProgID("Indesign.Application"));
Sign In or Register to comment.