Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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..
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement