Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Visual FoxPro 6.0 and Microsoft Word

151 views
Skip to first unread message

Demetrios Panayotakopoulos

unread,
Nov 3, 1998, 3:00:00 AM11/3/98
to
Hello,

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

John Henty

unread,
Nov 4, 1998, 3:00:00 AM11/4/98
to
Hi Demetrios,

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 ...

John Henty

unread,
Nov 5, 1998, 3:00:00 AM11/5/98
to
Hi Demetrios,
Thanks for the additional information on Word any information on this
subject is always useful to me, I have an application that I have
intergrated word to, and at the time found it very hard because Microsoft
did not supply me with enough information. Anyway I have the FormatTabs
information that you require.

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

TRUTh

unread,
Nov 5, 1998, 3:00:00 AM11/5/98
to
Hi all,

- 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)


Dimitri P.

unread,
Nov 9, 1998, 3:00:00 AM11/9/98
to
Hi John, ...this is a different Dimitri :)

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
____________________________________________________


0 new messages