All posts by Pavel Chuchuva

About Pavel Chuchuva

I help coaches to deliver group programs.

How to automate Adobe InDesign CS3

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:

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:

using System;
using InDesign;

namespace HelloInDesign
{
   class Program
   {
      static void Main(string[] args)
      {
         object missing = Type.Missing;
         Type type = Type.GetTypeFromProgID("InDesign.Application.CS3");
         if (type == null)
         {
            throw new Exception("Adobe InDesign CS3 is not installed");
         }
         _Application app = (_Application)Activator.CreateInstance(type);
         Document document = (Document)app.Documents.Add(true, missing);
         Page page = (Page)document.Pages[1];
         TextFrame textFrame = page.TextFrames.Add(missing,
            idLocationOptions.idUnknown, missing);
         textFrame.GeometricBounds = new string[] { "6p", "6p", "24p", "24p" };
         textFrame.Contents = "Hello from .Net!";
      }
   }
}

September 2007 rates increase

Australia Post has increased its rates in September 2007. If you open Post Charges Booklet (pdf) you can see these changes:

  Previous rate New rate
Regular post    
Small parcels up to 250 g $3.85 $4.00
Over 250g up to 500g $5.00 $5.20
Basic charge for destinations in the same state $6.70 $6.95
Basic charge for interstate destination $8.45 $8.75
Express post    
Parcels up to 500g $7.20 $7.40
Registered Post $2.60 $2.70

Distance charge has increased for most destinations by 5 or 10 cents per kilogram. International rates for parcels didn’t change.

Summary: rates have increased slightly. Next rate increase will be in March 2008.