Hi,
I'm automating Word with Delphi, but some times I got an error message:
The requested member of the collection
does not exist
It seems that the Item member of the Styles collection class does not always exist and some times causes the above mentioned error. My workaround is to catch the exception and skip it, but is there an...
How do you use PasteSpecial in Delphi to paste into an Ole PowerPoint. I have rtf data i want to paste into powerpoint and I need to use PasteSpecial. However I cannot find documentation on how to fill out the parameters it needs.
...
Hi
I'm trying to run an app thats designed for windows using wine. It's an reimplementation of the windows api. I'm getting these OLE errors so I was wondering if there's a way I can find out what's missing.
err:ole:ITypeInfo_fnInvoke did not find member id -518, flags 0x4!
err:ole:ITypeInfo_fnInvoke did not find member id -517, flags ...
When I am editing a Word document in an OleContainer (inplace) and I switch to another Word document and then I switch back, I cannot use my rightmouse button anymore. The context menu will not show up.
This happens on Word 2000, not on Word 2007 (I don't know about other versions).
How can I get rid of this behaviour?
How to reproduc...
This is a very common problem when Excel Worksheet or Chart is embedded into Word or Powerpoint. I am seeing this problem in both Word and Powerpoint and the reason it seems is the COM addin attached to Excel. The COM addin is written in C# (.NET). See the attached images for error dialogs.
I debugged the addin and found a very strange ...
I developed a C# web application that calls a web-service which returns a base64 encoded array (PDF file). I then convert that array into a UCOMIStream object (I know it is obsolete, but the DLL that I am using requires it as a parameter). I use the following code to do the conversion which works perfectly. I can pass this object to t...
I am adding an Excel Worksheet object inside Word. Excel has a COM addin attached to it. Any idea how one can know whether Excel is running independently or as an embedded object?
The COM Addin attached to Excel loads when the embedded Excel object is activated (double-clicked) inside Word. I am looking for some kind of a property or a ...
I have a test utility that depends upon an ocx file that is installed/registered on my development machine. We'd like to run this tool on a test machine without polluting the machine with any unnecessary files. Nothing should be installed except the target machine software. Running the tool on a network drive or from a stand-alone dir...
I am having difficulty opening a EXCEL 2007 in Delphi 7 It works for Office 2003 and below but the wonderful people at microsoft have sent an update or something and the delphi app fell over just earlier this month.
oE := GetActiveOleObject('Excel.Application');
oE.Workbooks.Open(Filename:=sFilename, UpdateLinks:=false, ReadOnly:=tr...
How do you programmatically save an excel workbook using OLE and C++ Builder?
I'm guessing it might be something like:
Variant excel = Variant::CreateObject("Excel.Application");
excel.OleProcedure("Save"); // but how might you specify the file name
...
WI have a windows shell extension which adds menu items to the printer menu when the printer is right-clicked. The code works fine in Windows 2000, XP, Vista, but in Windows 7 the call to GetData() fails with DV_E_FORMATETC. I've found various threads regarding this but they all appear to be VB/asp related. The FORMATETC and STGMEDIUM st...
Hi
I'm converting the following example code to Delphi:
http://msdn.microsoft.com/en-us/library/bb176406%28v=office.12%29.aspx
My code is something like:
var
vTable, vRow: OleVariant;
begin
....
while vTable.EndOfTable = False do
begin
vRow := vTable.GetNextRow;
sEmail := vRow['Email1Address'];
ShowMessage(sEmail)...
I'm learning Access 2007, and among the list of data types are the OLE Object and the Attachment.
The text has this to say about Attachments:
You can use attachments to store
several files, and even different
types of files, in a single field. The
Attachment field is new for Access
2007 and stores data files more
efficient...
Hi All,
I was thinking about inserting some object (button, panel or static text) into textctrl, like Outlook Express does this.
You can see from a pic "group1" is an object, you can double click on it, when you delete it, it gets deleted the whole text not just a part of it.
I made some research and this text field is just a sim...
I need to break open a MS Word file (.doc) and extract its constituent files ('[1]CompObj', 'WordDocument' etc). Something like 7-zip can be used to do this manually but I need to do this programatically.
I've gathered that a Word document is an OLE container (hence why 7-zip can be used to view its contents) but I can't work out how to...
Hi,
I'm re-implementing part of the OLE automation code in our in-house scripting language. I've written a piece of code that reads ITypeInfo and caches its members for every interface pointer that's used in a script. I use the cached info to convert names into dispids for calls to Invoke and for parameter count checking.
We also imp...
i want paste in delphi from richedit to word application
i used Following code but Twice paste data in word (duplicate)
WordApp := GetActiveOleObject('Word.Application');
WordApp.Visible := True;
Wordapp.documents.open('C:\Doc1.docx');
Richedit.Text := 'test text';
Richedit.SelectAll;
Richedit.CopyToClipboard;
WordApp.Acti...
I am using IOleInPlaceSiteWindowless::AdjustRect to properly capture and release the mouse in a windowless ActiveX control hosted in IE:
LRESULT CD3DControl::OnMouseMove(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/)
{
CRect rc(CPoint(lParam), CSize(0, 0));
HRESULT hr = m_spInPlaceSite->AdjustRect(rc);
...
Hi,
I have an application written in Powerbuilder 11.5 that automatically fills in form fields of a Word document (MS Word 2003).
The Word document is protected so only the form fields can be altered.
In the code below you can see I use char(10) + char(13) to insert a newline, however in the saved document all I see is 2 little squar...
Can you use COM/OLE in a C# program to connect to a running instances of internet explorer?
Ideally I'd like to find the URLs of all webpages open in IE.
...