Help needed with Office 2016 + OleContainer

Help needed with Office 2016 + OleContainer

(Delphi XE6 + Windows 7 64bit + Program compiled in 32bit, Office is also 32bit)

The example file: "mydoc.docx".

i can not open a Word document inside a OleContainer!

Example #1: Does´nt work!
CreateInfo.ShowAsIcon := False;
CreateInfo.ClassID := ProgIdToClassId('WordDocument');
CreateInfo.CreateType := ctFromFile;
CreateInfo.FileName := FOpenDocFilename;
CreateInfo.IconMetaPict := 0;
Container.CreateObjectFromInfo(CreateInfo); // here is all ok!

Container.DoVerb(ovShow); // here open Word outside from the container and say "File xxx not found / Permission denied.......".

Example #2: Same problem!!!

Container.CreateObjectFromFile(FOpenDocFilename, False);


My example works with Office 2010, but with office 2016 a have a lot of issues!

Can somebody help me?

Comments

  1. Just guessing: Perhaps your app is running virtualized because of a missing manifest?

    ReplyDelete
  2. What for a manifest do I need?

    ReplyDelete
  3. You guessing, I need a manifest to create Word 2016 inside a OleContainer? What do I have to set in the manifest to make Word 2016 work in the Ole Container?

    ReplyDelete
  4. Of course we are guessing. You didn't supply enough info to reproduce. You can't even decide what the error message is. It can't be both file not found and permission denied.

    So, if you want a concrete answer make a complete, minimal reproduction.

    ReplyDelete
  5. Patrick H. Yes, I was guessing you might be missing the UAC part - requestedPrivileges so your app gets virtualized access to file system and registry. This might impact working with some OLE components, Office in your case.

    ReplyDelete

Post a Comment