Word Doc OLE Problem

When using the code unit to open a word doc. via ole the word document is password protected. I want the user to be able to view the file in read only mode. The following problem occurs. The Word password box pops up behind the Navision screen. The Navision screen locks and you cannot even minimize it. You must answer the password protection on the Word doc prompt before proceeding. The only way out is to Ctrl+Alt+Del Navision. How does one get the word prompt on top of the Navison screen so that it may be answered?

Maybe take another approach. Check the document properties via your OCX to see if it password protected. If so open a Navision form to read in the password and pass it on via the OCX before trying to view the document. I’m probably missing a few steps in there but you should get the drift and it seems to work in excel. Regards Simon

The first line of code creates the problem The second line of code works fine!! // wdApp.Documents.Open(document); wdDoc:=wdApp.Documents.Open(document);