S
SFKC
Hi,
I follow this newsgroup yesterday and found a link (function) to open word
from Access. When I bind this function to a button, I reveive error at the
declaration line (Private mobjWordApp As Word.Application ). Could somebody
advice.
SF
'****** Code Start ********
'This code was originally written by Dev Ashish
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code Courtesy of
'Dev Ashish
'
Private mobjWordApp As Word.Application <====== Error in this line
Private Sub Command1_Click()
Const conTEMPLATE_NAME = "\Templates\merge.dot"
Set mobjWordApp = New Word.Application
With mobjWordApp
.Visible = True
.WindowState = wdWindowStateMaximize
.Documents.Add Template:=(.Options.DefaultFilePath( _
wdUserTemplatesPath) _
& conTEMPLATE_NAME)
End With
End Sub
'****** Code End ********
I follow this newsgroup yesterday and found a link (function) to open word
from Access. When I bind this function to a button, I reveive error at the
declaration line (Private mobjWordApp As Word.Application ). Could somebody
advice.
SF
'****** Code Start ********
'This code was originally written by Dev Ashish
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code Courtesy of
'Dev Ashish
'
Private mobjWordApp As Word.Application <====== Error in this line
Private Sub Command1_Click()
Const conTEMPLATE_NAME = "\Templates\merge.dot"
Set mobjWordApp = New Word.Application
With mobjWordApp
.Visible = True
.WindowState = wdWindowStateMaximize
.Documents.Add Template:=(.Options.DefaultFilePath( _
wdUserTemplatesPath) _
& conTEMPLATE_NAME)
End With
End Sub
'****** Code End ********