Results 1 to 2 of 2

Thread: Urgent- MS Word and ActiveX control problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    3

    Unhappy Urgent- MS Word and ActiveX control problem

    Hi All,


    This is very urgent.

    My problem is as follows:

    I want to find out the using vb howmany activex controls are there on a MS word document.

    ITs like this :

    Sub AddControl()

    CommandBars("Control Toolbox").Visible = True
    If Selection.StoryType <> wdMainTextStory Then
    Selection.HeaderFooter.Shapes.AddOLEControl Anchor:=Selection.Range, _
    ClassType:="INK.InkCtrl.1"
    Else
    ActiveDocument.Shapes.AddOLEControl Anchor:=Selection.Range, _
    ClassType:="INK.InkCtrl.1"

    End If
    CommandBars("Control Toolbox").Visible = False

    End Sub

    This is how I add a ActiveX Control using vba

    I have customized Word using vba so that when I click on a button in the menu a activex Control is loaded onto MS Word

    I want to retreive the names and count of activex controls created on the MS Word using vb code.


    please somebody help me.


    any help is gr8tly appreciated.


    thank u in advance

    Pivi

  2. #2
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Talking

    Cheat, just use an integer and add 1 to it for every control you add.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width