Hello:
I load a few RTFVariables into a dialog box for my users to edit, then store them back into the document, however, the contents of the last one 'Company' actually shows up on the 1st page of the document!
Any Ideas?
Dale
A code snippet is below:
Code
PropDlg := TDocPropertiesDlg.Create(Application);
try
PropDlg.txtTitle.Text := WpMemo.RTFVariables.Strings['Title'];
PropDlg.txtSubject.Text := WpMemo.RTFVariables.Strings['Subject'];
PropDlg.txtComment.Text := WpMemo.RTFVariables.Strings['DocComm'];
PropDlg.txtAuthor.Text := WpMemo.RTFVariables.Strings['Author'];
PropDlg.txtCompany.Text := WpMemo.RTFVariables.Strings['Company'];
if (PropDlg.ShowModal = mrOK) then begin
WpMemo.RTFVariables.Strings['Title'] := PropDlg.txtTitle.Text;
WpMemo.RTFVariables.Strings['Title'] := PropDlg.txtTitle.Text;
WpMemo.RTFVariables.Strings['Subject'] := PropDlg.txtSubject.Text;
WpMemo.RTFVariables.Strings['DocComm'] := PropDlg.txtComment.Text;
WpMemo.RTFVariables.Strings['Author'] := PropDlg.txtAuthor.Text;
WpMemo.RTFVariables.Strings['Company'] := PropDlg.txtCompany.Text;
WpMemo.Modified := True;
end;
finally
PropDlg.Free;
end;
Alles anzeigen