ole

How to extract the contents of an OLE container?

主宰稳场 提交于 2020-01-13 10:43:07
问题 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 (using C++): open the OLE container extract each constituent file and save it to disk I've found a couple of examples of OLE automation (eg here) but what I

Perl: Win32::OLE and Microsoft Outlook - Iterating through email attachments efficiently

最后都变了- 提交于 2020-01-11 05:37:27
问题 I'm an intern and very new to this... My boss gets an email with two attachments every Monday which he has to turn into wiki code and put it on our internal website. The process takes roughly 20 minutes every Monday due to the amount of information to transfer. I've been asked to stream line this process. I have code which will parse the file and break it up into components, and I have code to grab all the attachments out of his inbox. The issue I am facing is that my script starts at the

How to create an E-Mail in Outlook and make it visible for the User

流过昼夜 提交于 2020-01-11 04:37:19
问题 I want to create an E-Mail with a Java Application using Outlook and the OLE Client. I searched for examples and found quite a few. They all start the same way: Create the Display, the Shell, the OLE Frame and the OLE Client Site. But I get an error with these few steps: Display display = new Display(); Shell shell = new Shell(display); shell.setText("Outlook Automation"); shell.setLayout(new FillLayout()); OleFrame frm = new OleFrame(shell, SWT.NONE); OleClientSite site = new OleClientSite

How to free TOleStream in this bit of code

那年仲夏 提交于 2020-01-11 02:40:07
问题 This is from a custom namespacer handler done in Delphi I use to load files into a webbrowser component. Datastream:IStream; var F: TFileStream; Dummy: INT64; begin F:=TFileStream.Create(strfilename fmOpenRead); CreateStreamOnHGlobal(0, True, DataStream); TOleStream.Create(DataStream).CopyFrom(F, F.Size); DataStream.Seek(0, STREAM_SEEK_SET, Dummy); TotalSize := F.Size; F.Free; end; The problem is that Fastmm4 gives a memory leak error when the program ends and says that TOleStream was not

Excel unable to insert more than 255 chars?

情到浓时终转凉″ 提交于 2020-01-09 08:11:10
问题 I am using OLE DB driver to insert more than 255 characters into an Excel sheet, but I get the error: Exception Details: System.Data.OleDb.OleDbException: The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. Seems from this thread that it's an Excel limitation. Even the Microsoft site seems to say so here. So does this mean I can't programmatically, but I can manually? Because I can enter more than 255 characters when I manually type

Com error 800a03ec when i call PrintPreview() method of workbook

本秂侑毒 提交于 2020-01-07 04:49:08
问题 Show message of Com error 800a03ec when i can PrintPreview() of workbook m_spWorkbook->PrintPreview(); i get m_spWorkbook in the following code: hr = spOleObject->QueryInterface(__uuidof(_Workbook), (void**)&m_spWorkbook); what's the problem? 回答1: Exception 800a03ec often means problem with locale. For example, language in Excel differs from regional settings. Have a look at these links: http://blogs.msdn.com/b/eric_carter/archive/2005/06/15/429515.aspx http://support.microsoft.com/kb/320369

Microsoft OLE DB Provider for SQL Server (0x80004005)

烈酒焚心 提交于 2020-01-06 02:27:43
在弄有关Sharepoint的程序时有时会碰到这种情况,真上人摸不清原因(对sharepoint不懂 ),今天终于找到了这个,解决了,转自: http://tsinghualove.blog.hexun.com/21796806_d.html , thanks! Microsoft OLE DB Provider for SQL Server (0x80004005) [DBNETLIB][ConnectionOpen (PreLoginHandshake()).]一般性网络错误。请检查网络文档。 笔者ASP运行环境:操作系统为Windows XP SP2,IIS的版本为默认的5.1,数据库为SQL Server 2005(MDAC版本为2.8) 一、出现“Microsoft OLE DB Provider for SQL Server (0x80004005)[DBNETLIB][ConnectionOpen (PreLoginHandshake()).]一般性网络错误。请检查网络文档。”错误 在学习ASP过程中,笔者的数据库连接函数中,连接源Data Source一直设置的是机器名,在 后来将连接源Data Source改为本机IP地址127.0.0.1 就出现了“Microsoft OLE DB Provider for SQL Server (0x80004005)

Microsoft OLE DB Provider for ODBC Drivers 错误 \'80004005\'

冷暖自知 提交于 2020-01-06 02:27:35
Microsoft VBScript 编译器错误 错误 '80004005' 缺少 'End' /iisHelp/common/500-100.asp,行242 开始还以为真的是/iisHelp/common/500-100.asp,但后来才发现是连接字符串的问题,晕死以前还害得我重新装了2003~~~ Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005' MicrosoftODBC Microsoft Access Driver常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x704 Thread 0x830 DBC 0x9073fdc Jet'。 /qiaok/tongxuelu/class/ClassPhotoList.asp,行258 这是因为Windows2000 SP2以后的新bug造成的。也许微软不喜欢ODBC了,所以出此下策。正确的方法是使用OLEDB来连接Access。连接字符串为:"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&数据库文件名 搞定! 来源: https://www.cnblogs.com/kary/archive/2004/08/17/34004.html

Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'

拜拜、爱过 提交于 2020-01-06 02:27:27
最近在部署asp网站到客户服务器上的时候发生了两个错误,如下: Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005' [Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x174 Thread 0xa28 DBC 0x7ef2024 Jet'。 Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005' [Microsoft][ODBC Microsoft Access Driver] Microsoft Jet 数据库引擎打不开文件'(未知的)'。 它已经被别的用户以独占方式打开,或没有查看数据的权限。 老样子先google再百度,搜了一大堆解决方法,这里转个比较靠谱的吧。 方法1: 错误类型: Microsoft OLE DB Provider for ODBC Drivers (’0×80004005′) [Microsoft][ODBC Microsoft Access Driver] Microsoft Jet 数据库引擎打不开文件’(未知的)’。 它已经被别的用户以独占方式打开,或没有查看数据的权限。 /conn

使用Microsoft OLE DB Provider For Oracle链接Oracle

心不动则不痛 提交于 2020-01-06 02:27:04
1.打开SQL2005,右击服务器对象,选择新建,然后点链接服务器. 2.填上你所要设置的链接服务器名称,在访问接口中选择“Microsoft OLE DB Provider for Oracle”,产品名称随便取,数据源是你在本地配置服务时给它的服务名. 还要在安全性里选择使用此安全上下文建立连接,然后输入用户名密码,就OK了 3.点击确定就建立好了... 4.OPENQUERY知识点: 权限 : 任何用户都可以执行 OPENQUERY。用于连接到远程服务器的权限是从为链接服务器定义的设置中获取的。 例如:SELECT * FROM OPENQUERY(ABC,'select * from table'); 关于链接数据库中的存储过程sp_addlinkedserver,应该是系统里直接就有的吧,因为它在系统存储过程中.你可以执行一下:exec sp_addlinkedserver XXX,XXX,... 来源: https://www.cnblogs.com/piaoxueyuan/archive/2012/02/08/2342457.html