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
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
Comment