PDA

View Full Version : Solved: Prompt user for word, then insert via text hotspot?



Self-Annoyed
05-22-2005, 10:11 AM
Can this be done in Word? User opens a document or template, and is prompted to type a word of their choice. The word gets stored for later retrieval.

After typing the word, and the user is in the document, several text hotspots exist in various locations. If the user clicks on a text hotspot, the stored word appears, replacing that text hotspot. Other identical hotspots enable the user to insert the word again, if desired, at their unique locations.

Seems like this could be done with some tricky combination of ASK field and word macro, if only I could figure out how....?

Anne Troy
05-22-2005, 11:12 AM
Why "hot spots"? Why not just insert it with bookmarks? I mean... what's the point of the hot spots?

MOS MASTER
05-22-2005, 03:17 PM
Hi and Welcome to VBAX! :hi:

I have now idea what a Hot-Spot is in Word terms! (It's not a term used in my dutch Word version...I know that term from Lotus Notes)

Perhaps you could explain in a little more detail what you need and why you need it this way?

I'm sure we can cook something up..but have to know first what you want. :whistle:

fumei
05-25-2005, 09:55 AM
Yes, it could be done.

MOS MASTER
05-25-2005, 10:23 AM
Yes, it could be done.
Hi Gerry, :yes

Do you understand this question? If so could you explain to me what the OP wants? :whistle:

fumei
05-26-2005, 08:51 AM
If I understand correctly, then you would use a Character style.

' this checks for if "hotspots"
IF Selection.Style = whatever THEN
do a Replace for the text within that Character Style

Now what I may NOT understand is: do yiou want OTHER instances to be changed, or not. Originally it seemed you DO want other instances of the hotspot words to change; but in the end, it seems you DO NOT want automaticva changes, but allow the user to still change them at will.

MOS MASTER
05-26-2005, 09:51 AM
Hi Gerry, :yes

I'm glad you're understanding it because I'm not....

O well the OP is probably enjoying himself and I'm shure he'll clarify for us to continue...:whistle:

Self-Annoyed
06-02-2005, 03:56 AM
Sorry I was so long in responding; your inputs are appreciated! I'm a VBA newbie, using a project idea to learn more about VBA. My idea is to create a Word.doc that can function as a kind of 'project organizer' or 'list of mandatory ToDos, in chronological order' for a project manager. When the PM opens the project organizer.doc, he/she is prompted to enter several pieces of essential info such as their initials, dollar value of the project, due date, etc. and all these variables are stored somewhere for later use.
In the .doc, all necessary tasks/ToDo items are listed in mandatory order of completion.
Each task has one or more hotspots, to make certain actions as easy as 'one click'. Those actions would include:
- click here to type your initials, showing that the task is completed.
- click here to generate an email to a reviewer (one click would generate an Outlook email, prefilled with address, subject and several paragraphs of body text, plus attach one or more review.docs.) The body of any particular email would be comprised of various bits of info that the user entered when they first opened the project.doc.
I am pretty sure this can all be done through some tricky VBA, and my post was submitted to obtain verification from experts that I might be on the right track.

What I'm hoping to create, has surely already been created somewhere, in whole or part, by many others a Lot Smarter Than Me! If you happen to know of some pre-existing FREE VBA code that might help me assemble this 'learn-as-you-go' exercise, I'd sure appreciate hearing about it. So far, I've found some tantalyzing snippets but need to study and learn more, to be able to figure out how to use them.

fumei
06-02-2005, 07:38 AM
OK, this sounds a little like sponging. From reading your post, I would say...forget "hotspots", as this is NOT trivial coding.

Use ActiveX buttons. These are inserted into the document using the Controls toolbar. View > Toolbars > Controls.

Look up in Help. More importantly, come up with SPECIFIC ideas of what you want these objects to do.

Essentially your "hotspots" are one click things that DO SOMETHING. ActiveX buttins DO something. They are easier to use.

However the most critical thing is to work out your design. Write it out!

You say you have found snuppets and that you jhave to study and learn. Well....I hate to tell you this, but that IS the way to learn. And most of us that have further or advanced knowledge did oprecisely that. So use your snippets, try and do a small instances of what yo want. MAKE SOMETHING. You make something. Try it. When you have problem, hey post it here. We will be happy to help with something you have problems with. Some may post actual code anyway - for various reasons. Personally I think it is better to encourage people to write real code. Offering freebies will never let anyone learn.


- click here to type your initials, showing that the task is completed. would be easy. Use a formfield textbox.

MOS MASTER
06-02-2005, 09:57 AM
Hi, :yes

I must agree with Gerry on this.

The requirements are a bit vague but some of them can be quit hard to accomplish...(If I read them correct)

Yes you need a work flow design and put that in to little pieces and build it piece for piece.

You need:
* Template containing the layout you want it to be
* Navigation points in the template (Bookmarks/fields, etc...)
* Functional Design Description which will tell what you want happend if you do this or that.

Creating smart automation is a project of it's own and you should no that a good plan ahead saves you 80% of the total work/time if done well.

So cut your plan in to small parts and have them dealt with over here...

Later. :whistle: