Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help reqd for VB Macro conversion
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Help reqd for VB Macro conversion
Miscellaneous
Thread ID:
00596208
Message ID:
00596208
Views:
53
Hi All
Can anyone please give me the correct vfp syntax for the following VB code

*!* Documents.Add Template:= _
*!* "C:\Program Files\Microsoft Office\Templates\Normal.dot", NewTemplate:= _
*!* False
*!* ActiveDocument.Footnotes.Add Range:=Selection.Range, Reference:="#"
*!* Selection.TypeText Text:="name1"
*!* ActiveWindow.ActivePane.Close
*!* Selection.TypeText Text:="This is help for name 1"
*!* Selection.InsertBreak Type:=wdPageBreak
*!* ActiveDocument.Footnotes.Add Range:=Selection.Range, Reference:="#"
*!* Selection.TypeText Text:="name2"
*!* ActiveWindow.ActivePane.Close
*!* Selection.TypeText Text:="This is help for name 2"
*!* Selection.InsertBreak Type:=wdPageBreak

I have tried many variations but cannot get the Add range to accept properly.
Object has created ok

I know it should be something like
with oWord
.ActiveDocument.Footnotes.Add ??? Then what???
endwith

.Selection.TypeText('This is text') works fine

Any help appreciated
thanks
Derek..
Next
Reply
Map
View

Click here to load this message in the networking platform