Importing .OCX controls in vbscript

Creating a macro - Writing a Script - Using the API

Importing .OCX controls in vbscript

Postby ScreamingCactus » Wed Aug 27, 2008 9:14 pm

Hi, I'm trying to access COM ports via macros in OOo. The easiest way, in Excel, seems to be to import the MSComm32.OCX control and use it to talk to the ports. However, I can't figure out how to import the control in OOo. I looked thru the help but it seemed somewhat vague on the subject. Normally I just go to Project-->Components and add the .OCX, but I can't find the dialog in OOo where you add it. Is it possible to import OCX controls into Openoffice?
OOo 2.3.X on MS Windows Vista + SuSE 10.2
ScreamingCactus
 
Posts: 1
Joined: Wed Aug 27, 2008 9:00 pm

Re: Importing .OCX controls in vbscript

Postby ms777 » Sat Aug 30, 2008 1:24 pm

Hi,

I am afraid it is not that simple in OO. They only way I can imagine to access the com ports is using the kernel32.dll functions. See e.g. http://support.microsoft.com/kb/823179/en-us (the part starting with "Use platform invoke services to call Win32 API functions in Visual Basic .NET to access serial and parallel ports"). You will have to write lots of declares in OO Basic ...

If you want to go that way see http://www.oooforum.org/forum/viewtopic.phtml?t=66849 for interpreting the structures returned from / required by the dll calls

Good luck,

ms777
ms777
Volunteer
 
Posts: 131
Joined: Mon Oct 08, 2007 1:33 am

Re: Importing .OCX controls in vbscript

Postby ms777 » Sat Aug 30, 2008 3:02 pm

have a try with viewtopic.php?f=20&t=682&p=43434#p43434 . If it works, it is much simplier ...
ms777
Volunteer
 
Posts: 131
Joined: Mon Oct 08, 2007 1:33 am


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 6 guests