Hi all
Apologies if this is in the wrong category.
My database has links to open MS Word templates and insert data from the db using bookmarks. A new document opens (.doc) everything works great.
Problem is they don't work for any other users of the database, only me. Checking 'task manager' on other users PC shows Word open in the background (multiple versions if they have clicked the buttons more than once).
Sample button code is as follows :
' open in Word
Private Sub btnMG_Click()
' declare instance of Word
Dim Wrd As New Word.Application
Set Wrd = CreateObject("Word.Application")
' specify path and name to word doc
Dim MergeDoc As String
MergeDoc = Application.CurrentProject.Path
MergeDoc = MergeDoc + "\DoNotOpenDbMG.docx"
' open doc template and make visible
Wrd.Documents.Add MergeDoc
Wrd.Visible = True
' replace bookmarks with current data
With Wrd.ActiveDocument.Bookmarks
.Item("bmFullName").Range.Text = IIf(IsNull(Forms!frmcase(![bmFullName])), "", Forms!frmcase(![bmFullName]))
.Item("bmAgeCalculation").Range.Text = IIf(IsNull(Forms!frmcase(![bmAgeCalculation])), "", Forms!frmcase(![bmAgeCalculation]))
.Item("bmOccupation").Range.Text = IIf(IsNull(Forms!frmcase(![bmOccupation])), "", Forms!frmcase(![bmOccupation]))
End With
End Sub
Any obvious reasons why this setup shouldn't work for other users?
any advice appreciated
Thanks
John