VS.NET 2002/2003Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1).
** Please don't post code questions here **
For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
In case anybody still needs it, here's how you can use Adobe InDesign CS3 from .Net code:
1. Locate Resources for Visual Basic.tlb in C:\Documents and Settings\All Users\Application Data\Adobe\InDesign\Version 5.0\Scripting Support\5.0 folder.
2. Open command prompt and execute:
Code:
TlbImp.exe "Resources for Visual Basic.tlb" /out:Interop.InDesign.dll
TlbImp.exe is located in C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin folder on my machine. This will generate Interop.InDesign.dll file. This is an interop assembly.
3. Add reference to Interop.InDesign.dll to your project.
4. Use this code to create application object:
Code:
Type type = Type.GetTypeFromProgID("InDesign.Application.CS3");
if (type == null)
{
throw new Exception("Adobe InDesign CS3 is not installed");
}
InDesign._Application app = (InDesign._Application)Activator.CreateInstance(type);