Here it is:
Documents.Open FileName:="Dragonlog.doc"
Selection.EndKey Unit:=wdStory
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeText Text:="COPY OF DRAGON.LOG SAVED BY USER"
Selection.TypeParagraph
Selection.TypeParagraph
Selection.InsertFile FileName:="Dragon.log", Range:="",
ConfirmConversions _
:=False, Link:=False, Attachment:=False
ActiveDocument.Save
ActiveDocument.Close
Regards,
Rose wrote:
> The fact that Nat's error log file, dragon.log, limits itself to 20k and
> clears as soon as it grows larger bothers me. So I wrote a WordPerfect
> macro (will work in either 6.1 or 8.0) that pastes the contents of the
> log to the top of a previously created document which I named
> dragon.wpd. (To use this macro, first create a dragon.wpd document in
> your default documents directory) Here is the script:
>
> FileOpen (Filename: "C:\OFFICE\WPWIN\WPDOCS\DRAGON.WPD")
> AttributeAppearanceToggle (Attrib: Bold!)
> Type (Text: "COPY OF DRAGON.LOG SAVED BY USER: ")
> DateText ()
> AttributeAppearanceToggle (Attrib: Bold!)
> HardReturn ()
> FileInsert (Filename: "C:\NATSPEAK\DRAGON.LOG"; Yes!; Insert!)
> FileSave (;;Yes!)
>
> Would someone with more knowledge of VB, write the same macro in Word
> 8.0 (Office 97)?
> Would really appreciate it,
> Rose
-- If you have any more questions, let me know!Marcelo@@21st Century Eloquence 800 245 2133 ext 103
![]() |