Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word macro to vfp translation help
Message
From
28/12/1999 14:29:49
 
 
To
28/12/1999 14:13:32
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00309313
Message ID:
00309366
Views:
31
>Todd-
>"Unit" is a parameter. VBA uses named parameters and VFP uses positional, so the only trick is to figure out which position to pass the "1" in. From the VBA syntax, it looks like it'll be the first. Try:
>
>>What I am trying to do is add multiple tables to a document, so I need a range/place in the document to add the new table to, is there another way to get the range into a variable that corresponds to the end of the document?
>>

Hiya Nancy!

Thanks for the quick response!

Ok, I got it to go to the bottom of the document. (Turns out the wdstory constant is 6 (I found David Frankenbach?'s article about it.))

Now, how do I get a range object that corresponds to the point at the end of the document?

In other words, I've inserted the first table, move the cursor to the end of the document, now I want to insert a new table.

My code looks like this, if you are interested:
blah = this.oword.selection.endkey(6)
this.myrange = this.oword.activedocument.range(0,0)
this.mytable = this.oword.ActiveDocument.Tables.Add(this.myrange, 1, reccount() + 1)
this.header_rows = this.write_header()
this.write_row()
I call it for each table in a database. The problem is the this.myrange= statement needs to stop using the constant 0,0 but I have no idea what to put in there to represent "select the point at the end of the document." Can you help steer me in the right direction? I am busily reading the MSDN docs about it, and frankly am getting more and more 'fused as time goes by.

Thanks Nancy!

-Todd
--Todd Sherman
-Wake Up! Smell the Coffee!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform