Automating MS Word with VBScript

Results 1 to 2 of 2

Thread: Automating MS Word with VBScript

  1. #1
    Brian Ruggles Guest

    Default Automating MS Word with VBScript

    I&#039m using this script to create a Word doc on the client&#039s machine. Everything works fine, except that before the process kicks off, a message box appears saying: <BR><BR>"An ActiveX object on this page may be unsafe. Do you want to allow it to initialize and be accessed by scripts?"<BR><BR>I know a little about this, as I&#039ve created ActiveX controls for the Web before, but I guess I&#039m not sure what the &#039ActiveX object&#039 is in this case and how I can make it safe.<BR><BR>Here&#039s the code. Any suggestions? Thanks in advance.<BR><BR> <BR>&#060;Script Language= "VBScript"&#062;<BR><BR>Sub CreateWordDoc<BR>Set objWord = CreateObject("Word.Application")<BR>objWord.Visibl e = True<BR>Set objDoc = _<BR> objWord.Documents.Add _<BR> ("c:Program FilesMSOfficeTemplates")<BR>End Sub

  2. #2
    Leungas Guest

    Default RE: Automating MS Word with VBScript

    You don&#039t have much choice in that, the only thing you can possibly do is to ask the use to turn the security down so ActiveX can invoke word.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts