By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,057 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,057 IT Pros & Developers. It's quick & easy.

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

P: 6
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.Options.ButtonFieldClicks = 1
Options.SendMailAttach = 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 LockedHyperlinks()
Selection.Hyperlinks(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 _____(OptionButton) 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
Dec 21 '07 #1
Share this Question
Share on Google+
3 Replies


QVeen72
Expert 100+
P: 1,445
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:
Expand|Select|Wrap|Line Numbers
  1. Combo1.Clear
  2. Dim i As Integer
  3. For i = 1 To 10
  4.     Combo1.AddItem i
  5. Next
  6.  
Regards
Veena
Dec 21 '07 #2

P: 6
Nice! Thank you so much Veena!!

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:
Expand|Select|Wrap|Line Numbers
  1. Combo1.Clear
  2. Dim i As Integer
  3. For i = 1 To 10
  4.     Combo1.AddItem i
  5. Next
  6.  
Regards
Veena
Dec 21 '07 #3

P: 6
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.


Nice! Thank you so much Veena!!
Dec 21 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.