lotus notes & adobe indesign

Hello there,

I'm currently working on an application which needs to cummunicate with
Adobe Indesign...
I'm just not sure how to make OLE objects....
Does when I run this next LotusScript i get the following message:
Cannot create automation object...

This is the script....:

Sub Click(Source As Button)

 Dim db As NotesDatabase
 Dim myView As NotesView
 Dim myDocument As NotesDocument
 Dim myNotesItem As NotesItem
 Dim myAdv_kolom As Integer
 Dim myAdv_hoogte As Integer
 Dim myInDesign As Variant
 Dim count As Integer
 Dim myPub As Variant
 Dim myFrame As Variant
 Dim bounds (0 To 3) As String

 Set myInDesign = getObject ("", "InDesign.Application")
'This is where stuff goes wrong....!!
Set myPub = Indesign.Documents
 Set myFrame = InDesing.TextFrame

 Set db = New NotesDatabase( "", "uitgever.nsf" )
 Messagebox( db.Title )
 Set myView  = db.GetView( "advertenties" )

 Set myDocument = myView.GetFirstDocument
 count = 0

 Do Until myDocument Is Nothing
  Set myNotesItem = myDocument.GetFirstItem("adv_kolom")
  myAdv_kolom = 35 * myNotesItem.text
  Set myNotesItem = myDocument.GetFirstItem("adv_hoogte")
  myAdv_hoogte = myNotesItem.text
  Messagebox("Breedte " & myAdv_kolom & " Hoogte: " & myAdv_Hoogte)
  bounds(0) = "0p0"
  bounds(1) = "0p0"
  bounds(2) = myAdv_kolom
  bounds(3) = myAdv_hoogte
  count = count + 1
  Set myDocument = myView.GetNextDocument( myDocument )
 Loop

 Messagebox("Zoveel documenten: " & count)

End Sub

Does anybody have any ideas?
thanks in advance....

Harm de Laat




HarmDeLaatAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ghassan99Commented:
coz the application must have been already started when u use GetObject in this way.  Use CreateObject, like this example:
Dim myInDesign As Variant
Set myInDesign = CreateObject("InDesign.Application")
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HarmDeLaatAuthor Commented:
i did that already....
problem is when i need to create a document or some other object in Indesign lotus gives me the following message...:
Cannot create automation Object

This is the script i use...

thanks in advance

Sub Click(Source As Button)
      
      Dim db As NotesDatabase
      Dim myView As NotesView
      Dim myDocument As NotesDocument
      Dim myNotesItem As NotesItem
      Dim myAdv_kolom As Integer
      Dim myAdv_hoogte As Integer
      Dim myInDesign As Variant
      Dim count As Integer
      Dim myPub As Variant
      Dim myFrame As Variant
      Dim bounds (0 To 3) As String
      
      Set myInDesign = createObject("InDesign.Application")

        ' This is where things go wrong
      Set myPub = Indesign.Documents
      Set myFrame = InDesing.TextFrame
      
      Set db = New NotesDatabase( "", "uitgever.nsf" )
      Messagebox( db.Title )
      Set myView  = db.GetView( "advertenties" )
      
      Set myDocument = myView.GetFirstDocument
      count = 0
      
      Do Until myDocument Is Nothing
            Set myNotesItem = myDocument.GetFirstItem("adv_kolom")
            myAdv_kolom = 35 * myNotesItem.text
            Set myNotesItem = myDocument.GetFirstItem("adv_hoogte")
            myAdv_hoogte = myNotesItem.text
            Messagebox("Breedte " & myAdv_kolom & " Hoogte: " & myAdv_Hoogte)
            bounds(0) = "0p0"
            bounds(1) = "0p0"
            bounds(2) = myAdv_kolom
            bounds(3) = myAdv_hoogte
            count = count + 1
            Set myDocument = myView.GetNextDocument( myDocument )
      Loop
      
      Messagebox("Zoveel documenten: " & count)
      
End Sub
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.