Ask Experts Questions for FREE Help !
Ask
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #1

    Apr 28, 2009, 08:59 AM
    Using VBA with Microsoft Word to create questionairre!
    We scrapped the Acrobat approach as we found out you cannot control what is exported. We decided on trying to use Visual Basics for Applications and creating Macros that can be used in M$ Word. If we cannot get this to work our last option is Using Straight Visual Basic but the maintenance is a considerable amoount more so that is our last resort.

    What we want to do is have a word doc. That displays a list of questions. These questions are then gone through and ticked if wanted and not ticked if not wanted. After these questions have been gone through there will be an action button that submits the ticked questions along with a header to a new page where it will print off for use by the intended individual.

    If anyone has any suggestions or other ways we could go about doing this please let us know ASAP.

    Thanks in Advance

    Rick
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #2

    Apr 28, 2009, 09:03 AM

    You will be able to do this using VBA. It shouldn't be a big deal, if you have someone who is sufficiently competent in VBA or at least a programmer who can learn it. You can create forms in VBA, and it sounds like all you need is a bunch of checkboxes.
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #3

    Apr 28, 2009, 09:40 AM

    Correct. We've got the main part figured out. We have created the form with little resistance. The only question I have is after this list is gone through and the questions are decided upon. We want the chosen questions along with the default header to be sent to a new page. This new page will have only the questions that were ticked and the default header. Thus, the individual can use this second page to do with what was intended.

    Thank you for your response perito.

    I am just researching how; in VBA, to transfer text from one document to another. Like mentioned above!

    Rick
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #4

    Apr 28, 2009, 09:45 AM

    One trick I use (when I'm working with VBA -- not my favorite language) is to create a macro and then examine the macro code to see how it was done. I then copy that code to my own subroutines and delete the macro.

    The Visual Basic in Office 2007 is different from the VBA used in earlier versions of the product. I think that 2007 will work with code written in previous versions. Nevertheless, it's something you should keep in mind for the future.
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #5

    Apr 28, 2009, 10:00 AM

    I agree with Perito on VBA code for Word or Excel. Create a macro by capturing the keystrokes you use to manually complete the task then look at the generated code and modify it.

    But you still won't be able to create an executable. The user will need Word to open the file and fill it in. You should also be sending the user a DOT file, not a DOC. The user will then need to save the document as a DOC.

    Put if what you are trying to do is have users fill in a survey and collect the results can I suggest two alternatives; www.surveymonkey.com as one. For the other, if all the users are using Office 2007, you can use Access to create an e-mail form, send it via Outlook and have the user fill in the form and return it. The filled in data can then be automativcally added to the Access table.
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #6

    Apr 28, 2009, 10:00 AM

    This is exactly what I need.

    I need the code for VBA to transfer text from the current document to a new document. Both documents will be M$ Word. I'm looking all over and can't seem to find it. (I am new to VB and VBA)

    Perito,

    I am not the lead on this, I will show him your idea. Thanks so much for the response.

    Rick
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #7

    Apr 28, 2009, 10:03 AM

    If you send the questionairre as a DOT, the user will have to create a new document to save it.
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #8

    Apr 28, 2009, 10:03 AM
    Here's what it is for.

    I am with my brother who is the Systems Admin. For an insurance company.

    The producers of this company would like a list of questions they can go through and select and then print to take to their potnetial clients. The questions very on the prospected company as well as what type of insurance. This list is essentially a databse of all the questions that the producers can then go through select the appropriate Q's they need for their current job and then print only the questions selected.

    Rick
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #9

    Apr 28, 2009, 10:05 AM

    Ahh, I see. When they create this list of questions are they connected to the company network?
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #10

    Apr 28, 2009, 10:06 AM

    Yes, my brother will put it on one of the local drives to be used by those with rights to that drive (all the producers)
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #11

    Apr 28, 2009, 10:09 AM

    Then I would use a Database for this. Create a database of the questions, include a field to select the question. Then print a report listing only the selected questions. After printing clear the select field. If you need to you can keep track of the selected questions for each instance.
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #12

    Apr 28, 2009, 10:15 AM

    Well we've got the form already made, by chance are you familiar with VBA syntax
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #13

    Apr 28, 2009, 10:19 AM

    Not so much with Word.
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #14

    Apr 28, 2009, 10:21 AM

    OK, thanks for the responses though. I'll keep everyone updated for the sake of self-learning

    Rick
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #15

    Apr 28, 2009, 11:22 AM

    We got it.

    We found the coding for it!

    Thanks to all who responded!

    Rick

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Microsoft word [ 4 Answers ]

I am using Microsoft Word 2003, trying to alphabetize addresses, can anyone tell me if there is a "sort a list alphabetically" option in word 2003?

Lotus word to Microsoft word [ 2 Answers ]

My articles are saved in lotus word format. Can I opened it under Microsoft word or " open office" software? If yes, how do I go about it?

Help In Microsoft Word [ 2 Answers ]

I have two questions. 1. How do you save a backup copy of a document? 2. How do you recover the text from a damaged document?

Microsoft word [ 1 Answers ]

Why can't I type in Microsoft Word? And when I could type how do I make It stop erasing the words in front of what I type?

Microsoft Word [ 5 Answers ]

Hi, I have to do a essay and I am going to be doing it in Word XP. However, I have to have double spacing after each word. I don't really want to be pressing the spacebar twice after every word I type. Is there a way that I can confgure Word XP to automatically do two spaces when I press the...


View more questions Search