Hi Experts
How to getrid of password coming to document made using password protected Template
I have certain template from wich i have to make word document but if the Tepmplate is password protected The same is also comming to the Word Document
i am using
uses
Word97;
procedure OpenNewDocumentWithTemplate(TemplateFileName: TFileName);
var
loleTemplateFileName: OleVariant;
lWordDocument: _Document;
lWordApplication: TWordApplication;
begin
loleTemplateFileName := 'PasswordprotectedTemplate.dot';
lWordDocument := WordApplication.Documents.Add(loleTemplateFilename, EmptyParam);
{ WordDocument.Unprotect('password');
this will work only if i know the password
geting password from the user is not possible since every thing has to work in batch process}
if WordDocument.TrackRevisions then
WordDocument.TrackRevisions := False;{ i will be able to do this if and only if wordDocuument is not password protected}
end;
The basic problem i am facing to make a document file from a password protected template without the password
I am also interested in solution to hide the Wordapplication
from the user while i am using it in the program
Thank fully
JPattom
How to getrid of password coming to document made using password protected Template
I have certain template from wich i have to make word document but if the Tepmplate is password protected The same is also comming to the Word Document
i am using
uses
Word97;
procedure OpenNewDocumentWithTemplate(TemplateFileName: TFileName);
var
loleTemplateFileName: OleVariant;
lWordDocument: _Document;
lWordApplication: TWordApplication;
begin
loleTemplateFileName := 'PasswordprotectedTemplate.dot';
lWordDocument := WordApplication.Documents.Add(loleTemplateFilename, EmptyParam);
{ WordDocument.Unprotect('password');
this will work only if i know the password
geting password from the user is not possible since every thing has to work in batch process}
if WordDocument.TrackRevisions then
WordDocument.TrackRevisions := False;{ i will be able to do this if and only if wordDocuument is not password protected}
end;
The basic problem i am facing to make a document file from a password protected template without the password
I am also interested in solution to hide the Wordapplication
from the user while i am using it in the program
Thank fully
JPattom