Search the Community
Showing results for tags 'ole'.
Found 3 results
-
Hello, I'm trying to remove Word metadata using OLE. I can remove Author but I can't remove "Last author". I use following code: vEditor:= CreateOleObject('Word.Application'); vEditor.Visible:=True; vDoc:= vEditor.Documents.Open('sample.docx'); vDoc.BuiltInDocumentProperties.Item['Author']):= '';//It works! vDoc.BuiltInDocumentProperties.Item['Last Author']):= '';//It doesn't work vDoc.Save; vDoc.Close; vEditor.Quit; I hope you have some experience with such a task and you can help me. If there is other solution than using OLE please also give me an info.
-
Hi, I mainly use Outlook to send emails, and on some I attach a document. My code mainly revolves around this line: vMailItem.Attachments.Add( filename ); (vMailItem being the Outlook item object. However, what I'm finding is that after I've sent an email with a file, if I want to send another email but without a file, the file is still attached to the email. I've cleared the edit box which holds the file name (which I use to get the name of the file). I use a boolean variable to say whether there is an attachment or not and that code does bypass the above line, but the previous file is still being attached. Is there a method which can remove any previous file attachments to an email, like 'vMailItem.Attachments.Remove' ?
-
In Delphi XE3, I have been using remote control of Microsoft Word via TWordApplication, e.g. for assembling quotations from multiple documents; it mostly worked fine, even though it sometimes hanged and needed a restart of my program. Now it suddenly stopped working: when I call WordApplication.Connect (the first step), in unit WordXP, line 30576 (procedure TWordApplication.Connect) it always raises an exception "Interface not supported" in the line containing: Fintf:= punk as _Application; It seems it can no longer establish the interface with Word. In Delphi, Components | Install packages, I find that (as usual) "Microsoft Office XP Samples Automation Server Wrapper Components" are enabled, but not the similar stuff for Office 2000. It had always worked like that. I migrated from Office 2013 to Office 365 a couple of weeks ago. Remote control of Word continued working, only now it stopped. I wonder whether an update of " Microsoft Office Click to Run" might have broken it. I tried several things without success: starting the Office 365 installer again, and Start menu | Apps and Features, searching for Office, making a " quick repair" for various items. It seems that Office is broken, not my program - right? Any ideas how to fix it?
- 10 replies