Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2004

    Cool Unanswered: Create Word Doc from Access, Edit it, and then save it.

    I want to create a word doc from my Access program, save it with a designated name structure ie."c:\TS-" & Me.Scriptnum & ".doc " where me.scriptnum is a field on an open form, and then keep the doc open and be able to view & edit it, save it from word and return to Access. I am using the following code,

    Dim oApp As Object
    Dim WordDoc As Object
    Set oApp = CreateObject("Word.Application")
    Set WordDoc = CreateObject("Word.document")
    oApp.Visible = True
    WordDoc.Application.Visible = True
    WordDoc.SaveAs "c:\TS-" & Me.Scriptnum & ".doc"

    and when i execute the code, Word "Flashes" open, Saves the document, and puts it on the windows application bar at the bottom of the screen. (See Screen Shot Attached) Another Word screen is also open "Behind" the access application I am running.
    Funny thing is that, with this exact code it works flawlessly on my laptop at work, but will not work on my pc at home. VERY STRANGE ! Can any one help with this.
    Attached Thumbnails Attached Thumbnails AccessWordDoc.jpg  

Posting Permissions

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