Interacting with a Word document...

The goal: to launch Word from VB, open a specific template, have the user edit the new document, close Word (or return to the VB app, and have the app go pick up the document for emailing.

I know how to launch Word and how to pick up the document but I have two questions remaining.
1.  Is there a way to make Word modal (return control to the app after the user has fininshed editing the document)?
2.  How do I name the document with a predetermined name and save it without user control so that after they finish editing the document, the document is already named and now just has to be closed with a close/save command?

Any help would be appreciated.
Who is Participating?
MirkwoodConnect With a Mentor Commented:
My answers were correct sorry.
Word Modal. No hardly possible

Assuming your code looks like
Dim modapp as new Word.Application
Set mmdoc = modapp.Documents.Open("c:\temp\xxx.doc", True)

Also take a look at the OLE1 control

Comments please??
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

svfafelAuthor Commented:
Mirkwood, sorry for not commenting sooner.
My code is like this:
    Dim objWord As Word.Application
    On Error Resume Next
    Set objWord = Nothing
    Set objWord = GetObject(, "Word.application")
    If objWord = "" Then   'error
        Set objWord = CreateObject("Word.Application")
    End If
    objword.Documents.Add ("c:\my documents\")
    objword.Visible = True
When i use the "objword.documents.add(TEMPLATE NAME)" it creates a Document1 in Word.  I want to name this document (c:\temp\tempdoc.doc) and save it in that location without user interaction BEFORE the user begins to edit it.  After they edit the document they will close Word (or the document) and my app will go pick it up (tempdoc.doc).  The naming and saving (without user interaction) is what i need help on.
Dim worddoc as word.document
set worddoc = objword.Documents.Add ("c:\my documents\
worddoc.saveas ...
svfafelAuthor Commented:
sorry for the delay....had a baby! (boy #2)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.