OLE between Access and Word

  • Thread starter IUnderstandSomething
  • Start date
I

IUnderstandSomething

My code:

+++++++
Private Sub btnNewJournal_Click()

Dim objWord As Object
Dim Doc As Object
With Me!Journal
.Enabled = True
.Locked = False
If .OLEType <> acOLENone Then
MsgBox "There is already a journal"
GoTo slutt
End If
End With
Set objWord = CreateObject("Word.Application")
'.Application.WordBasic
Set Doc = objWord.Documents.Add(Template:="n:\NewJournal.doc",
Visible:=True)
With objWord
.Bookmarks("Name").Select
.Selection.TypeText Text:="BlaBlaBla"
End With
Me!Journal = objWord.ActiveDocument

End Sub
+++++++

Does not compute. I have a bound OLE control in an Access form and try
to make a new Word document from a file and connect it to my control.

Anyone?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top