General information
Category:
Coding, syntax & commands
Title:
Help reqd for VB Macro conversion
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only