Login | |
|
 |
RE: Problem with script. May be simple. Object required - 5/8/2006 7:11:31 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
|
There are some fundamental issues here: 1)When you are assigning objects to a variable, you need to use the set keyword: Set secindex = Document.section(i) 2) Your Do loop is running while secindex <> sectcnt. secindex is an object and sectcnt is an integer. The wo will never be equal. 3) I don't know exactly what you want to do, but this may point you in the right direction: Function getsect() Dim sectcnt Dim secindex Dim i sectcnt = Document.sectionCount() MsgBox sectcnt i=0 do while secindex <> sectcnt Document.Section(i).allowMultipleCfds = 1 i=i+1 loop End Function
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Problem with script. May be simple. Object required - 5/12/2006 2:20:28 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
|
" The program i am writing in is a proprietary software made by a canadian company" Are you writing this code in their software or are you writing code that is being run by the windows script host and simply using a COM object exposed by this other company's software?
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Problem with script. May be simple. Object required - 5/12/2006 6:51:32 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
|
Wihout knowing the object model of that application it will be really hard to figure out the problem. I would suggest talking to the company.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Problem with script. May be simple. Object required - 5/19/2006 3:16:29 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
|
From looking at that model, it appears that .Section is not a collection. If that is the case then you cannot use (i) to get different sections. I think you are going to need to find someone that has worked with this software before to figure out the way to script what you need.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|