Does anybody know where I can find info concerning the VFP and Microsoft
Word communication ?
I am trying to create a report in a word document. I have found some info
like the following in the examples ...
objWDdoc=Create("Word.Basic")
objWDdoc.AppShow
objWDdoc.filenewdefault
...
...
But how do I :
o Set or clear the TabStops
o Set the paragraph justifications
etc.
Thanks in advance
Demetrios Panayotakopoulos
You could try, ObjWDdoc.FormatTabs(,,,,,,ClearAll)
for the tabstops, You may need to put ClearAll in quotes.
I got this from the book titled "Microsoft Word Developer's Kit" published
by Microsoft Press.
The problem with this book is that it is really for Word 6.0, but is is the
closest I could get. The example I gave you read -
ObjWDdoc.FormatTabs.ClearAll as you can see I had to change it, the commas
before the ClearAll were for other parameters but you need them.
Hope this helps, if you need me to explain it further then let me know.
regards John
Demetrios Panayotakopoulos wrote in message ...
FormatTabs
.Position Position of the tab stop in a
text measurement
.DefTabs Position for default tab stops
in the document in points or
a text measurement.
.Align Alignment of the tab stops:
0 Left, 1 Center, 2
Right, 3 Decimal, 4 Bar
.Leader The leader character for the tab
stop:
0 None, 1 Period, 2
Hyphen, 3 Underscore
.Set Sets the specified custom tab
stop.
.Clear Clears the specified custom
tab stop.
.ClearAll Clears all custom tab stops.
good luck
john
- Thanks to Christian Desbourse I found in the vbawrd8.hlp the "Visual Basic
Equivalents
for WordBasic Commands"
- l would also like to thank John Henty and Loris Antonangeli. Loris I will
check your file.
The Help file will really help me a lot, allthough that there are some
differences
For example I checked the FormatTabs function which I had allmost decoded
with trial and error
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
In help:
FormatTabs Position, DefTabs, Align, Leader, Set, Clear, ClearAll
With Selection.Paragraphs.TabStops
.ClearAll
.Add Position:=num, Alignment:= WdTabAlignment, Leader:= WdTabLeader
.Item(1).Clear
End With
ActiveDocument.DefaultTabStop
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
From VFP I issue the function with the following (8) parameters:
* 1st Position Char ( why ?)
* 2nd DefaultTabStops Num
* 3d Num
* 4th Allignment Num 0=Left, 1=Center, 2=Right,
3=Dec, 4=Bar
* 5th Leader Num 0=None, 1=".", 2="-", 3="_"
* 6th ? Num
* 7th Set or Clear Num 0=Set Tab, 1=Clear Tab (1st param)
* 8th Clear All Num 0=Set Tabs, 1=Clear All Tabs
Thans again all of you.
Demetrios Panayotakopoulos (Greece)
Where did you find the info on the tabs?
Dimitri P.
___________________________________________________________
remove the !* and one @ to get the real email address.
___________________________________________________________
while you are passing out the spam, don't forget these guys.
root@localhost
$LOGNAME@localhost
%%USERNAME%%@localhost
ab...@tiac.net
$LOGIN@localhost
$USER@$HOST
$USER@localhost
____________________________________________________