C
Claude Hunter
I am rewritting a Delphi 7 Word 2003 automation program that will not run
properly in Vista with Word 2007. I'm using Delphi 2009, Vista Enterprise,
and Word 2007.
Everything in the program works fine (creating a document, inserting text,
formating test, inserting tables, etc.) except when I attempt to use the
SaveAs procedure (WordApplication.ActiveDocument.SaceAs). The Word 2007
always throws an exception at the point. The following is the Delphi code
I'm using to call the SaveAs proceudre. Since I'm using early binding in
Delphi, I must supply all parameters.
WordApp.Connect;
WordApp.Visible := True;
SaveFile := 'C:\Users\Administrator\Documents\WordTest.docx';
WordApp.ActiveDocument.SaveAs(SaveFile,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam);
I have tried everything to solve this. I've asked for help on the Delphi
forums and no one there seems to have this problem. The U.S. government
office I work for is very strict with computer/network security. Is there
anything in the Word 2007 Trust Center settings that could affect this?
Claude Hunter
properly in Vista with Word 2007. I'm using Delphi 2009, Vista Enterprise,
and Word 2007.
Everything in the program works fine (creating a document, inserting text,
formating test, inserting tables, etc.) except when I attempt to use the
SaveAs procedure (WordApplication.ActiveDocument.SaceAs). The Word 2007
always throws an exception at the point. The following is the Delphi code
I'm using to call the SaveAs proceudre. Since I'm using early binding in
Delphi, I must supply all parameters.
WordApp.Connect;
WordApp.Visible := True;
SaveFile := 'C:\Users\Administrator\Documents\WordTest.docx';
WordApp.ActiveDocument.SaveAs(SaveFile,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam,
EmptyParam);
I have tried everything to solve this. I've asked for help on the Delphi
forums and no one there seems to have this problem. The U.S. government
office I work for is very strict with computer/network security. Is there
anything in the Word 2007 Trust Center settings that could affect this?
Claude Hunter