>>>If I call word in vfp:
>>>
>>>Public oWord
>>>oWord= CreateObject('Word.basic') && I am not using Word 97!
>>>oWord.Appmaximize()
>>>oWord.TableInsertTable()
>>>* it will add a table with 2 rows and 2 columns...
>>>
>>>Because I need to border the 1 cell with thick border!
>>>
>>>2nd, how to call the complex word macros?!
>>>e.g. formattab at ruler setting.. too long and many parameters.. >_<
>>>
>>>Thanks
>>
>>Justok,
>>
>>The best way I have for learning how to do things with Word or Excel is to go to word open a document turn on the macro recorder and do what I want. Shut off the recorder and look at the macro it created. It does require that you make changes to meet VFP syntax, but it sure beats trying to find answers in the word documentation.
>
>
>Well, I have done it but some of the syntax is too complex.
>for simple highlight action, I can successful change the code!
>
>e.g. Macros in Word:
>lineup 1,1
>
>Command in VFP:
>oWord.lineup(1,1)
>
>but I donno how to change the following word macros into VFP syntax:
>TableInsertTable .ConvertFrom = "", .NumColumns = "1", .NumRows = "1", .InitialColWidth = "auto", .Format = "0", .Apply = "167"
>
>which has many parameter setting!!
Hi Justok.
VBA and VB have named function parameters that's why order of these parameters
does not make difference(in VB or VBA). VFP function parametters must follow in right order.
Each VBA function has default order of parametrs. You can see this order from MSWORD VBA object browser. You must run this function in VFP with default order of parametrs.BTW TableInsertTable is WORDBASIC function but VBA function.
You can use ActiveDocument.Tables.Add Range:=range, NumRows:=num, NumColumns:=num instead.
ALEX.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement