HarmDeLaat
asked on
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("a dv_kolom")
myAdv_kolom = 35 * myNotesItem.text
Set myNotesItem = myDocument.GetFirstItem("a dv_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
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("a
myAdv_kolom = 35 * myNotesItem.text
Set myNotesItem = myDocument.GetFirstItem("a
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.App
' 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("a
myAdv_kolom = 35 * myNotesItem.text
Set myNotesItem = myDocument.GetFirstItem("a
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