rtdc
Registered User.
- Local time
- Today, 21:43
- Joined
- Feb 27, 2007
- Messages
- 55
I have a situation where an Access 97 runtime operating database which was running fine on Windows 2000 and Word 2000 has been moved the Windows XP and Word 2003.
Now none of the DDEInitiate commands work, all this code did was open the word doc as read only something the users insist on.
DocName = DLookup("[ISSUE DOC]", "IR REPORT'S", "[IR NUMBER]=Forms![IR Listing for Issued]![IR listing Issued Sub Form].Form![IR NUMBER]")
Chan = DDEInitiate("WinWord", "System")
If Err Then
Err = 0
Temp = Shell("C:\Program Files\Microsoft Office\office11\winword.exe", 1)
If Err Then Exit Sub
Chan = DDEInitiate("WinWord", "System")
DDEExecute Chan, "[FileOpen .Name = """ & DocName & """,.Readonly =1]"
End If
Exit Sub
As this no longer works at all not even an error message just click a button and nothing it has to be replaced. I have tried this
Dim objword As Word.Application
Dim objdocu As Word.Document
Set objword = New Word.Application
Set objdocu = objword.Documents.Open(DocName, , True)
objword.Visible = True
Set objdocu = Nothing
Set objword = Nothing
Yes it opens the document as read only but when closing keeps asking to save changes to the normal template, also on open it starts by saying word cannot open *j
All other dde functions I have successfully replaced as they were either save as commands or just opening a document for which I used hyperlinks to rectify.
Any ideas on how I can open a named word doc from access 97 to word 2003 in read only without setting the read only properties on the document itself.
Cheers
Now none of the DDEInitiate commands work, all this code did was open the word doc as read only something the users insist on.
DocName = DLookup("[ISSUE DOC]", "IR REPORT'S", "[IR NUMBER]=Forms![IR Listing for Issued]![IR listing Issued Sub Form].Form![IR NUMBER]")
Chan = DDEInitiate("WinWord", "System")
If Err Then
Err = 0
Temp = Shell("C:\Program Files\Microsoft Office\office11\winword.exe", 1)
If Err Then Exit Sub
Chan = DDEInitiate("WinWord", "System")
DDEExecute Chan, "[FileOpen .Name = """ & DocName & """,.Readonly =1]"
End If
Exit Sub
As this no longer works at all not even an error message just click a button and nothing it has to be replaced. I have tried this
Dim objword As Word.Application
Dim objdocu As Word.Document
Set objword = New Word.Application
Set objdocu = objword.Documents.Open(DocName, , True)
objword.Visible = True
Set objdocu = Nothing
Set objword = Nothing
Yes it opens the document as read only but when closing keeps asking to save changes to the normal template, also on open it starts by saying word cannot open *j
All other dde functions I have successfully replaced as they were either save as commands or just opening a document for which I used hyperlinks to rectify.
Any ideas on how I can open a named word doc from access 97 to word 2003 in read only without setting the read only properties on the document itself.
Cheers
