Having a bit of a problem... Not sure if it is me or Access 2007 Runtime. I have a DB that does Job Bids, after a form is complete there is a button that opens a Word Document template and fills in the info from the form. I designed this in Access 2003, converted that over to 2007 and used it as my "Runtime" testing DB... What I am coming up with are errors when you click the button to open the Word template. It looks like it is looking for a reference that isn't there. OF course by using the 2007 Runtime there is no way to open it and set the reference. Also I might have 2 different versions of Word I am working with. In the past this hasn't been a problem... I thought Access simply found the correct reference.... For example if it was set for Word 11 at home on another computer and opened at work where Word 10 was installed it found and changed the reference and worked fine.......
So the question is...How do I make it find the new or correct reference to the correct version of Word being used?
code on the button starts as.....
Public Function MergetoWord()
' This method creates a new document in MS Word using Automation.
On Error Resume Next
Dim WordObj As Word.Application
Dim TemplateChoice As String
Set WordObj = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set WordObj = CreateObject("Word.Application")
End If
WordObj.Visible = True
'Code here to allow choice of Template
Dim strMyTemplatePath As String
strMyTemplatePath = "C:\ContractTemplate.dot"
............so on..........
So the question is...How do I make it find the new or correct reference to the correct version of Word being used?
code on the button starts as.....
Public Function MergetoWord()
' This method creates a new document in MS Word using Automation.
On Error Resume Next
Dim WordObj As Word.Application
Dim TemplateChoice As String
Set WordObj = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set WordObj = CreateObject("Word.Application")
End If
WordObj.Visible = True
'Code here to allow choice of Template
Dim strMyTemplatePath As String
strMyTemplatePath = "C:\ContractTemplate.dot"
............so on..........