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 concaten...
I am trying to get the rcom package for R working. It seems to have installed ok:
> install.packages("rcom");
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://mira.sunsite.utk.edu/CRAN/bin/windows/contrib/2.9/rcom_2.2-1.zip'
Content type 'application/zip' length 204632 bytes (199 Kb)
opened URL
downloaded...
I need to change some custom properties values in many files. Here is an example of code - how I do it for a single file:
import win32com.client
MSWord = win32com.client.Dispatch("Word.Application")
MSWord.Visible = False
doc = MSWord.Documents.Open(file)
doc.CustomDocumentProperties('Some Property').Value = 'Some New Value'
doc.Save(...
I'm trying to run a MathType in a C# app... using OLE in forms to signify the equations/images.
This is how I started with the code.
I got the CLSID object for math type equation. I create a new instance and run a verb to start Math Type. This works good until I try to set or get data of the IDataItem attribute I have.
Code:
string pr...
How can I mannually terminate an excel application using OLE Automation?
I would like to do this in some exception handling so that an excel process does not remain running if a function throws an error.
Currently I use the below code to open excel:
Variant excel = Variant::CreateObject("Excel.Application");
...
First, I'd like to note that I need to use the COM/OLE2 APIs, the low level stuff, the stuff you can put in a C Windows Console program. I can't use MFC. I can't use .NET.
My question is:
Given the following code:
CLSID clsid;
HRESULT hr;
hr = CLSIDFromProgID(L"InternetExplorer.Application", &clsid);
assert(SUCCEEDED(hr));
hr ...
Related question [stackoverflow] here.
I'm trying to do the above, but I want to take the process one step further. I want to open an arbitrary file using the default editor for the file type. From that point, I want to allow my user to interact with the file as they would normally, or continue to work in my application. The extension i...
I have an ActiveX control that displays documents of a given file format within IE, much like Adobe have an ActiveX control that displays PDFs.
My control is a full-page control, just like the PDF viewer - it takes over the whole client area of IE, using IE's own EnableFullPage mechanism.
I'd like to take control of the various menu an...
I'm automating Excel in Visual Studio 2008 in my 64-bit MFC application. I've added the MFC wrappers and have followed the articles on MSDN on how to implement. Bascically I'm just reading the values of a range. The problem is the Excel process stays loaded in the task manager. Does it have something to do with a 64-bit app running on 64...
HOW TO close Excel instance started by mail merge
this code running inside launcher does not have access to Excel running via DDE ??
'For i = 1 To Workbooks.Count
' MsgBox ("here" + Workbooks(i).Name)
'If (Workbooks(i).Name <> ActiveWorkbook.Name) Then
'Workbooks(i).Close
'End If
'Next i
...
I control Excel instance via OLE and I want to start macro recording. Can I do that via code? The only thing I've found is Application.RecordMacro and it doesn't do what I need.
...
Hi. I use IE 8 OLE object from ruby to navigate to a certain page, than I select an image on the page. How to get its location and extension?
OK, the image IS in cache, how to get it's name in cache?
...
I have tried using JXL and Apache POI to load data from an excel file, up until now the JXL mechanism has worked fine. Even if I embed an images in the file.
I received a file from a source which wont parse, I get the following exception with POI
Exception in thread "main" org.apache.poi.hssf.record.RecordInputStream$LeftoverDataExcep...
How to close excel opened by Word mail merge macro?
With ActiveDocument.MailMerge
.MainDocumentType = wdCatalog
Connection:="Entire spreadsheet", SubType:=8, ReadOnly:=True
.Destination = wdSendToNewDocument
.Execute
End With 'Activedocument
DDETerminateAll
...
Is there any method within Perl which would allow me to get the object in a read only mode,
so as to avoid the dialog that pops up if the file is locked by another user?
$document = Win32::OLE->GetObject("$docFile")
or die "can't open $docFile";
...
Hi,
According to the 'Microsoft Office Word™ 2003 Visual Basic Reference', it seems the Document object can only load a file from disk or save a file to disk. Is it possible to save a document to memory or load a document from memory? Since I need to save the documents to a database instead of to disk files. I use Delphi.
Thank you in ...
To receive the bounty, please provide an answer with working code. Thanks.
I have a stdole.StdPicture Object of the Type vbPicTypeIcon. I need to convert it to Type vbPicTypeBitmap. Due to project contraints, I need to be able to do this using Win32 or VBA. I am trying to load a file's icon to a command bar button. Here is what I have s...
I have a .NET (C#) addin that uses a COM Shim dll to load itself into Excel. The addin works fine without any problem when Excel is run normally. The addin displays its own custom toolbar in Excel that is used to execute different commands.
When I embed Excel into another application (e.g. DSOFramer etc), the addin starts behaving stran...
Hello to All MSSSQL/Perl guru's,
I want to emulate MSSQL/TDS-Server ,
so my 'Microsoft SQL Server Management Studio' (windows client) could SQL-SELECT(only READ)
some distributed data that sits on Linux machines using regular-SQL query or linked-server
( and that's why i cannot use OLE DB Providers and their friends , i also cann...
The .NET application for which I'm responsible uses a third-party control that is only available as a 32 bit COM component. I've been banging my head against walls for a while trying to find a way to allow the component and the app to work together in 64-bit mode. We got some help from the control vendor - they don't plan on supplying ...