ole

Column Width autofit functionality using perl

戏子无情 提交于 2019-12-31 03:20:07
问题 I have generated the excel sheet using set of csv files using perl script.In that i need to set width of the column as auto-fit .What 'm suppose to do i've got The way to do this in the module called OLE i don't know how to do this you please help me? 回答1: There is no way to set a file's column to "AutoFit" because that is not a setting of the file. Excel calculates this and sets a column width at run-time. One option is to calculate the "AutoFit" width yourself based on your data, and then

Convert System.Drawing.Bitmap to stdole.StdPicture

巧了我就是萌 提交于 2019-12-30 08:41:00
问题 I have a System.Drawing.Bitmap currently and I need to convert it into an stdole.StdPicture. Currently I'm using: var pic = (stdole.StdPicture)Microsoft.VisualBasic.Compatibility.VB6.Support.ImageToIPicture (MyDLL.Properties.Resources.Img); // this is a System.Drawing.Bitmap but I get a Compiler Warning: Warning 'Microsoft.VisualBasic.Compatibility.VB6.Support.ImageToIPicture(System.Drawing.Image)' is obsolete: '"Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within

Error “The object invoked has disconnected from its clients” - automate IE 8 with python and win32com

微笑、不失礼 提交于 2019-12-30 08:18:09
问题 I would like to automate Internet Explorer 8 (using python 2.7 on Windows 7) machine. Here is my code after a post found on SO: import sys, time from win32com.client import WithEvents, Dispatch import pythoncom import threading stopEvent=threading.Event() class EventSink(object): def OnNavigateComplete2(self,*args): print "complete",args stopEvent.set() def waitUntilReady(ie): if ie.ReadyState!=4: while 1: print "waiting" pythoncom.PumpWaitingMessages() stopEvent.wait(.2) if stopEvent.isSet()

Port Forwarding by Using “HNetCfg.NATUPnP” Ole Object Failed

元气小坏坏 提交于 2019-12-30 07:20:54
问题 I am using a code for forwarding a port. this code works fine on My Windows 7; but I can't use It on Windows XP. Update 1 For Problem(2012-10-17 07:32:00Z) This is my source code: uses ActiveX, oleAuto; Procedure AddUPnPEntry(Port: Integer; const Name: ShortString; LAN_IP: string); Var Nat: Variant; Ports: Variant; SavedCW: Word; Begin if NOT(LAN_IP = '127.0.0.1') then begin try Nat := CreateOleObject('HNetCfg.NATUPnP'); Ports := Nat.StaticPortMappingCollection; // Error Raized From Here!!!

Crystal Reports Changing the Data Source

我们两清 提交于 2019-12-30 05:53:21
问题 I have a Crystal report where the data source has originally been set to use ODBC connections. Now I want to modify the data source to instead use OLE DB instead of using ODBC. How do I replace the data source connection without breaking the database fields which I have originally set up for my report? If I try to delete the original data source, the fields which I have already set up are also deleted. Is there a way to map the report to use OLE DB instead of the ODBC connection? Thanks. 回答1:

Excel VBA create an embedded WebBrowser and use it

末鹿安然 提交于 2019-12-30 04:48:06
问题 Hi I'm trying to dynamically create a web browser inside a spreadsheet and then use it but the WebBrowser functions don’t seem to work Here is how I create the WebBrowser Set myWebBrowser = Sheets("test").OLEObjects.Add(ClassType:="Shell.Explorer.2", Link:=False, DisplayAsIcon:=False, left:=147, top:=60.75, width:=141, height:=96) This will work myWebBrowser.top = 10 But this will give me an error myWebBrowser.Navigate ("about:blank") Any ideas on what should I do thank you UPDATE: This will

Reading RTF File Containing an OLE Embedded Object

隐身守侯 提交于 2019-12-25 17:18:28
问题 Question : I need to read an RTF File that contains an OLE Object as innerdocument. RTF File = [ Ole object (word document) is embedded into it.] Sample RTF File that contains word as OLE Embedded into it. Reference I have done : OLE as Image in RTF Here they have done a program to extract the image embedded as OLE in RTF. I had extracted the program which is marked as correct answer , but its does not work for me. Using OpenXML SDK. (it cannot be able to open RTF Files.) some other SDK like

Reading RTF File Containing an OLE Embedded Object

依然范特西╮ 提交于 2019-12-25 17:18:22
问题 Question : I need to read an RTF File that contains an OLE Object as innerdocument. RTF File = [ Ole object (word document) is embedded into it.] Sample RTF File that contains word as OLE Embedded into it. Reference I have done : OLE as Image in RTF Here they have done a program to extract the image embedded as OLE in RTF. I had extracted the program which is marked as correct answer , but its does not work for me. Using OpenXML SDK. (it cannot be able to open RTF Files.) some other SDK like

Using Win32::OLE to execute macro in Access 2007

不问归期 提交于 2019-12-25 01:49:59
问题 Currently I am trying to execute a macro in Microsoft Access through Perl OLE I am wondering how to properly make the call to run a macro. I have tried 1) $oDatabase -> DoCmd.RunMacro("Macro1"); 2) $oDatabase -> DoCmd -> RunMacro("Macro1"); But they throw me "Can't call method "DoCmd" on an undefined value" or "useless use of concatentation" Is this even possible to execute a DoCmd through Win::32 OLE? Any help would be greatly appreciated. Here is a complete code. It tries to look for the

Alternatives to Search and Replace to use for telling to an application where to put content in a Word document

懵懂的女人 提交于 2019-12-24 20:27:04
问题 I write an application that does also document management. I do this in Delphi but the question may apply to c# too. I just got a very useful reply to this question I asked that made ma Search&Replace work easier. One requirement I have is automatically insert some data in the document according to the db data every time the user opens a document. Up to now (and this includes the subject of the question mentioned above) I was doing this just once: "create document from template" = substitute