in your loop:
For i = 0 to Ubound(TextFrameArray)-1
depends if your are working with CS5 and up, itemByName should be used in the layers palette.
(see my answer on: http://forums.adobe.com/thread/899665?tstart=0)
Hope this helps
Still not working unfortunately. I have added the names into the layers palatte.
The code below produces
"Object doesn't support this property or method"
Set myInDesignServer = CreateObject("InDesignServer.Application.CS5")
Set myDocument = myInDesignServer.Open("C:\test.indd")
TextFrameStr = "name1,name2,name3,name4"
TextFrameArray = split(TextFrameStr, ",")
'On Error Resume Next
For i = 0 to Ubound(TextFrameArray) - 1
myDocument.pageItems.itemByName(TextFrameArray(i)).nextTextFrame = myDocument.pageItems.itemByName(TextFrameArray(i + 1))
many thanks in adavnce for any help
I think your loop should run 3 times.
Right now on the 4th loop it tries to link the name4 to nothing.
I've tried reducing the looping down (For i = 0 to Ubound(TextFrameArray) - 2) and I still get the error...
"Object doesn't support this property or method" myDocument.pageItems.itemByName