Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2005

Tip: Looking for answers? Try searching our database.

Register OCX-components by means of VBA-code?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bo Hansson - 03 Feb 2005 19:17 GMT
If possible, please an example!

/BosseH
Jay Freedman - 04 Feb 2005 02:52 GMT
>If possible, please an example!
>
>/BosseH

Hi Bo,

Use the Shell command to launch regsvr32.exe (which is in the
C:\WINDOWS\system32 folder), with the ocx's path and filename as a
parameter.

If there are no spaces in the path, something like this will work:

  Shell "regsvr32 c:\windows\system32\asctrls.ocx"

If there are spaces, you need to include quotes around the
path/filename as part of the parameter. To do this, represent the
quotes as Chr$(34) like this:

  Shell "regsvr32 " & Chr$(34) & _
      "c:\program files\quicktime\qtplugin.ocx" _
      & Chr$(34)

--
Regards,
Jay Freedman
Microsoft Word MVP         FAQ: http://word.mvps.org
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.