B
Bill
I am using Access 2003 and I have the following code that is supposed to open
a Word template for editing by the user.
________________________________________________
Dim strTemplate As String
' Late binding references to Word
Dim objWord As Object
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Dim objDoc As Object
' TemplatePath is a global variable containing the path to where the .dot
file is stored
strTemplate = TemplatePath & Me.cboLetterSelect.Column(3)
Set objDoc = objWord.Documents.Open(strTemplate)
' AppActivate lblTemplateName.Caption
' AppActivate objWord.Application.ActiveDocument.Name
objDoc.ActiveWindow.View.Type = 3 ' wdPrintView = 3
Set objWord = Nothing
Set objDoc = Nothing
______________________________________________
This code words fin in XP but when I run it on a Vista machine, the template
opens as a read-only document. I have tried to run it with each of the
AppActivate commands uncommented. Both work fin in XP but I get an error
message in Vista. Full Access is installed on the XP machine and just the
run-time on the Vista machine.
Anyone any ideas?
a Word template for editing by the user.
________________________________________________
Dim strTemplate As String
' Late binding references to Word
Dim objWord As Object
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Dim objDoc As Object
' TemplatePath is a global variable containing the path to where the .dot
file is stored
strTemplate = TemplatePath & Me.cboLetterSelect.Column(3)
Set objDoc = objWord.Documents.Open(strTemplate)
' AppActivate lblTemplateName.Caption
' AppActivate objWord.Application.ActiveDocument.Name
objDoc.ActiveWindow.View.Type = 3 ' wdPrintView = 3
Set objWord = Nothing
Set objDoc = Nothing
______________________________________________
This code words fin in XP but when I run it on a Vista machine, the template
opens as a read-only document. I have tried to run it with each of the
AppActivate commands uncommented. Both work fin in XP but I get an error
message in Vista. Full Access is installed on the XP machine and just the
run-time on the Vista machine.
Anyone any ideas?