ole

Display Microsoft Access “OLE Object” in my application

℡╲_俬逩灬. 提交于 2019-12-07 22:32:15
问题 I have an an Access database that contains an OLE Object field. I need to extract the contents of this field as an image. It does not matter what type was originally placed in the OLE Field. I just need an image that represents what that object looks like. The main goal of this is to move away from the OLE Object field to a more standard image stored in a blob field. I have found some example code that parses the blob and tries to extract the underlying file. I am really looking for something

Modify an embedded Excel object inside a Word doc

不打扰是莪最后的温柔 提交于 2019-12-07 19:23:01
问题 I need example code or even a 3rd party object that will allow me to get to an excel object embedded in a word doc. I have already tried Aspose and they do not have the capabilities yet. Has anyone done it or do you know of a 3rd party object that will? 回答1: Ok, i did it! I appreciate the link posted by Remou. It did provide some support after I got past the initial hurdle... Here is my code: WordApp.Documents.Open("C:\Report.docx") Dim iOLE As Int16 Dim oSheet As Object Dim oOLE As Object

how to connect to an open window of internet explorer using c#?

点点圈 提交于 2019-12-07 12:08:41
问题 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. 回答1: I found the answer here and the code excerpt is: public class Form1 : System.Windows.Forms.Form { static private SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindowsClass(); public Form1() { InitializeComponent(); foreach(SHDocVw.InternetExplorer ie in shellWindows) { MessageBox.Show("ie.Location:" + ie.LocationURL); ie

msxml3.dll in context sp_OAMethod 'send'

℡╲_俬逩灬. 提交于 2019-12-07 06:05:35
问题 Working code from Win2003 + SQL Server 2005 is not working under Win2012 + SQL Server 2012 sp1. The only ~real solution I found is: I copied C:\Windows\System32\msxml3.dll from a Server 2008 to the same dir on a server 2012. Problem on 2012 server solved, sending with POST and GET working fine. But as I cannot modify server and both msxml3.dll and msxml6.dll are locked - I need to understand what is wrong and apply other way. Code is simple as usual for grabbing soap web service: Declare

execute multiple update command on Excel

隐身守侯 提交于 2019-12-07 03:30:45
问题 I have an Excel file and I want update multiple rows in a sheet.So I write this code : OleDbConnection cn = new OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = " + serverPath + ";Extended Properties = Excel 8.0;"); try { strUpd = ""; strUpd += "update [Data14City$] set B_1_1 = 5 ,B_1_2 = 26 ,B_1_3 = 44 ,B_1_4 = 8 where id = 1 "; strUpd += " update [Data14City$] set B_1_1 = 0 ,B_1_2 = 8 ,B_1_3 = 17 ,B_1_4 = 0 where id = 2"; cn.Open(); OleDbCommand cmdInsert = new

Delphi - Adding BCC & CC Recipients to OLE Outlook object

拥有回忆 提交于 2019-12-06 16:30:19
The answer to the post " How is working with Outlook in Delphi different than other email clients? works great. See below. Using this example how would you go about adding CC and BCC recipients? USES OleCtrls, ComObj; procedure TForm1.Button1Click(Sender: TObject); const olMailItem = 0; var Outlook: OLEVariant; MailItem: Variant; MailInspector : Variant; stringlist : TStringList; begin try Outlook:=GetActiveOleObject('Outlook.Application') ; except Outlook:=CreateOleObject('Outlook.Application') ; end; try Stringlist := TStringList.Create; MailItem := Outlook.CreateItem(olMailItem) ; MailItem

How can I load another new Word document in the same Word window?

狂风中的少年 提交于 2019-12-06 14:41:15
问题 It seems that in the Microsoft Word object model, a Word document is bound to a Window, but I want to close the existing document and open a new one without closing the Word window. How can I do this? 回答1: This works for me to close a document and open a document in the same window (I'm running the macro from normal.dotm ): Sub CloseOpenSameWindow() Dim d As Document: Set d = ActiveDocument Application.ScreenUpdating = False d.Close Application.Documents.Add Template:="C:\Users\Me\Desktop

How to cast a control to IOleObject

被刻印的时光 ゝ 提交于 2019-12-06 14:15:51
I want to invoke GetClientSite on a .net control. For this purpose I am trying to cast a control (in example Windows.Forms.Form) to IOleObject which returns null. What should I do to get IOleObject? using System; using System.Runtime.InteropServices; using System.Security; using System.Windows.Forms; namespace Test001 { public class Form001 : Form { public Form001() { InitializeComponent(); } private void InitializeComponent() { this.SuspendLayout(); this.Name = "Form001"; this.Text = "Form001"; this.Load += new System.EventHandler(this.Form001_Load); this.ResumeLayout(false); } private void

International date formatting issues in OLE Excel output

拜拜、爱过 提交于 2019-12-06 12:34:04
In a product I am currently working with Excel spreadsheets are generated using OLE from Delphi. The spreadsheets include a number of dates where the application loads the shortdate format from the system settings and applies this to the cells. This works perfectly except when the system formats are set to one of at least Russian, Bashkir, Tatar, Yakut, Kazak and Uzbek (there may be others I have not tried). The code is- xlws.Cells[irow,icol] := ActivityData.Target_Date; xlvalidrange := xlws.Range[xlws.Cells[irow,icol],xlws.Cells[irow,icol]]; xlvalidrange.NumberFormat:= LocShortDateFormat; In

Embedding objects into Microsoft Word and OpenOffice Writer

徘徊边缘 提交于 2019-12-06 10:26:12
问题 I am looking for some references on how to implement the following feature: ability to embed objects (e.g. diagrams) into word processors and being able to edit them in their respective "mother" application For example, MS Word and Visio work like this together, allowing the user to easily edit/tweak the diagrams after adding them to the word processor. I am interested in how this is done on the following platforms: Microsoft Word OpenOffice So far I know that: Microsoft Word -- uses OLE/COM