Commandbutton, OptionButton, Combobox help please?!?! No VB experience!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • junglej815
    New Member
    • Dec 2007
    • 6

    Commandbutton, OptionButton, Combobox help please?!?! No VB experience!!

    Hey Everyone...

    Like I said I have no experience really with VB and need some help if anyone can offer some. Sorry if there have been questions like this already, I looked around but didn't see any out there.

    Question # 1
    I have a form in Microsoft Word that is to be filled out by others and then sent back to me. I have a command button that acts as the " Submit " button on the form. In VB I was able to make it so that when clicked a new mail message opens in Outlook with the Word Document attached automatically. Using this code:

    Private Sub CommandButton1_ Click()
    Application.Opt ions.ButtonFiel dClicks = 1
    Options.SendMai lAttach = True
    ActiveDocument. SendMail
    End Sub

    What I am trying to fgure out is, is there additional coding to make so that when the command button is clicked it attaches the document as well as inputs the " Send To " email address in the " To " field on the Outlook new mail message. I did find the following code that can be used for a macrobutton for a hyperlink that works for this but not sure something like this will work for the command button:

    Sub LockedHyperlink s()
    Selection.Hyper links(1).Follow
    End Sub

    Question # 2

    I have a couple Option Buttons on the form as well that will be selected for either AM or PM. The form looks like this:

    Start Time ____ (OptionButton) AM (OptionButton) PM
    End Time _____(OptionBut ton) AM (OptionButton) PM

    I also have Option Buttons used to be selected for equipment that is needed such as:

    (OptionButton) Polycom (OptionButton) Wireless Mic

    My problem is I can only select 1 OptionButtons at a time on the whole form. Is there a way to make it so that I can select more than 1 Option Button on the form?

    Question # 3

    I have a couple ComboBoxes on the page that I can't seem to figure out how to add the multiple items to it.

    Any help with these questions will be Greatly Appreciated!!!

    Thanks,
    Joe
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Answer to Question 2:

    Place all the Related Options in a Container like Frame (VB6) / GroupBox(Vb.net )
    (Select the Option button, Cut from form and Paste on Frame)

    Answer to Question 3:
    [code=vb]
    Combo1.Clear
    Dim i As Integer
    For i = 1 To 10
    Combo1.AddItem i
    Next
    [/code]

    Regards
    Veena

    Comment

    • junglej815
      New Member
      • Dec 2007
      • 6

      #3
      Nice! Thank you so much Veena!!

      Originally posted by QVeen72
      Hi,

      Answer to Question 2:

      Place all the Related Options in a Container like Frame (VB6) / GroupBox(Vb.net )
      (Select the Option button, Cut from form and Paste on Frame)

      Answer to Question 3:
      [code=vb]
      Combo1.Clear
      Dim i As Integer
      For i = 1 To 10
      Combo1.AddItem i
      Next
      [/code]

      Regards
      Veena

      Comment

      • junglej815
        New Member
        • Dec 2007
        • 6

        #4
        Hey Veena or anyone...

        I'm not sure that vb code is right or if i'm not too sure of how to really use it...

        what i need is to have a combobox in a word document that contains:

        Content Room A
        Content Room B

        and so on...that someone can hit the drop down arrow and select Content Room B from the list.


        Originally posted by junglej815
        Nice! Thank you so much Veena!!

        Comment

        Working...