Forum at OOoForum.orgThe Forum
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Lotus Script and createEnumeration (Solved)

Post new topic   Reply to topic Forum Index -> Writer
View previous topic :: View next topic  
Author Message
General User
General User

Joined: 02 Apr 2008
Posts: 11

PostPosted: Wed Apr 02, 2008 10:08 am    Post subject: Lotus Script and createEnumeration (Solved) Reply with quote

Solved. Silly me I did not have the braces () on the createEnumeration

I am new to this forum, and have tried searching, but I guess not has been posted much with Notes/Domino and using Open Office.

All I am trying to do is find the tables listed in a document. When I find the tables, I want to find out how many columns there are.

I have copied/pasted some code and this does open the document, but all the lines marked are getting an Object Variable not set.

Note: All I wanted to do was read the elements in the document.
Note: Lotus Script is similiar to VB

Thanks to all. John
Dim objServiceManager As Variant
Dim objCoreReflection As Variant
Dim objDesktop As Variant
Dim objText As Variant

Dim objDocument As Variant
Dim args() As Variant

'-- Create the Objects to handle the document
Set objServiceManager = CreateObject("")
Set objCoreReflection= objServiceManager.createInstance("")

Set objDesktop = objServiceManager.createInstance("")

Set objDocument = objDesktop.loadComponentFromURL("file:///C:/"+"table"+".sxw", "_blank", 0, args)
Dim oTextEnum As Variant
Dim oTextElement As Variant
Set objText = objDocument.getText()

Set oTextEnum = objDocument.Text.createEnumeration 'did not work
Set oTextEnum = objText.Text.createEnumeration 'did not work
Set oTextEnum = objText.createEnumeration 'did not work

' Never hits the below code
While oTextEnum.hasMoreElements()
oTextElement = oTextEnum.nextElement()
Msgbox "Here I am"

Call objDocument.close( True )
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Forum Index -> Writer All times are GMT - 8 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group