Create TabsStops in a WordDoc ?

Sniperzorro

New Member
Hi everybody,

I try to create TabStops via Progress in my created Worddoc.
I Have looked in de COM Object Viewer, and tried and tried, but I really can't seem to get the translated syntax in Progress right.

The macro I made in Word says:
Selection.ParagraphFormat.TabStops.Add Position:=CentimetersToPoints(2.5),

Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces


And the translation that is given by TabSTops in de COM viewer, is:

<com-handle>: Add (
Decimal-Position AS FLOAT,
<anytype>-Alignment BY-VARIANT-POINTER,
<anytype>-Leader BY-VARIANT-POINTER ).

Does any one has a simple but brilliant example how to do this ???
If I have a good working example, it shall be easier for me to understand more of the (complicated) COM Object Viewer.

Thanks already !!

Greetz,
Maurice
 

Sniperzorro

New Member
Create TabsTops in a Worddoc

Hey hey,

Thanks for your answer but that's not exactly what I mean.
With your method you create a simulation of the TAB button of your keyboard, which leads literally to a TAB to the right of the line.

What I want to do is to set (Right or left-aligned) tab-STOPS in a document, who must be set for the whole document, or at least set from the line where I am at that moment. (You normally set these tabstops with your mouse on the ruler on top of your worddoc.)

Regards,
Maurice

PS: Does any one know of good documentation about Com Handling of these 'microsoft' com objects ? I know automation.i (good include!) , but that include does not include the more difficult translation actions to Progress.
And to learn from de Com Object Viewer, I personally thinks it's a disaster..
 

samu fish

New Member
If you can avoid it?

If the same tab settings must be set for the whole document it might be easier to create a .dot file with all necessary settings and styles done. Then you just base your new document to that template and use those styles for your paragraphs.
 

Sniperzorro

New Member
That is actually the reason for my question here; I can not avoid it, my document is just far to complicated and 'multi-tabbed' to put it al in one 'pre-tabbed' .dot form.
But if I look at the replies so far, it seems to be quit difficult to find the RIGHT syntax (with an example).

Even the CREATOR of automation.i replied me to make the macro in Word en then translate it into Progress. hmzz. That's just the difficulty, I already tried a 100 times. But I couldn't get it to work...


Greetingz,
Maurice.
 
Top