locked
I'm using Word 2010 on Windows 7 - when I try to generate an MS Word report on an online DB using VBScript Word opens but the report does not generate. RRS feed

  • Question

  • I have an Online DB to store property information.  The database will generate reports in MS Word 2007 using VBScript on multiple work stations using Windows XP or 7 just fine.  When trying to run the same report in Word 2010 ; Word opens to a blank document but fails to generate the report.  The online DB reports that the report was generated but it is not produced in Word 2010, no errors are displayed in Word.

    Trust Center Setting for Word 2007 & Word 2010 are both the same

    Friday, June 15, 2012 1:54 PM

All replies

  • Please try the following simple script to see if there is a problem with security settings:

    Set objWord = CreateObject("Word.Application")
    objWord.Caption = "Test Caption"
    objWord.Visible = True
    Set objDoc = objWord.Documents.Add()
    Set objSelection = objWord.Selection
    objSelection.Font.Name = "Arial"
    objSelection.Font.Size = "18"
    objSelection.TypeText "This is a simple test"
    objSelection.TypeParagraph()
    objSelection.Font.Size = "14"
    objSelection.TypeText "" & Date()
    objSelection.TypeParagraph()
    objSelection.TypeParagraph()
    objSelection.Font.Size = "10"
    objDoc.SaveAs("D:\TEST\VBS\Word\testdoc.doc")
    objWord.Quit
    This script will create a simple documents with some simple content, by default, the document will be saved to the file path ("D:\TEST\VBS\Word\").

    Max Meng

    TechNet Community Support

    Monday, June 18, 2012 6:34 AM
  • check this link this may help you

    http://www.ehow.com/ms-word-documents/

    Tuesday, June 19, 2012 5:20 AM