Macros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I would program macros in WP 5.1, I used the command CTRL PgUp RETURN
RETURN so that the macro would stop at the place where I wanted to insert
text and the macro would then continue to the end. Can anyone tell me what
the command is in MS Word to accomplish the same macro? Pausing the macro
does not work.
 
First, macros in WP are primarily keyboard repeaters. This is not the case
in Word.

For much that you would use a macro in WP, you would use a very different
tool in Word, such as an online form, fields, or even UserForms. Before you
start trying to program Word, learn it. Otherwise you will be trying to
reinvent the wheel, or worse, working against the program.

Here is some general info on moving from Word Perfect to Word:

Word and Word Perfect work very differently from one another. Each program's
methods have strengths and weaknesses; but, if you try to use one of these
programs as if it were the other, it is like pushing on a string! You can
easily make a lot of extra work for yourself. In the (short) long term
(weeks rather than years) spending the time to learn Word will save you time
if you are spending any time at all (more than an hour a day) using Word.

See http://www.addbalance.com/word/wordperfect.htm
http://www.mvps.org/word/FAQs/General/WordVsWordPerfect.htm
http://www.mvps.org/word/FAQs/General/TipsAndGotchas.htm
http://www.mvps.org/word/FAQs/General/RevealCodes.htm
http://www.mvps.org/word/FAQs/General/WordPerfectConverters.htm
http://www.shaunakelly.com/word/concepts/introduction/index.html
for information on Word for Word Perfect users.

For more:
http://www.mvps.org/word/FAQs/Customization/CreateATemplatePart2.htm
http://www.mvps.org/word/FAQs/Customization/CreateATemplatePart1.htm
http://www.addbalance.com/usersguide/templates.htm
http://www.mvps.org/word/FAQs/Numbering/WordsNumberingExplained.htm
http://www.addbalance.com/usersguide/styles.htm
http://www.mvps.org/word/FAQs/Customization/WhatTemplatesStore.htm


Function Keys

In Word 2000 (or later) You can get the function keys to display in a
special toolbar at the bottom of the screen if you want (something like
pressing F3 twice in WP). The following macro will do this.
Sub ShowMeFunctionKeys()
Commandbars("Function Key Display").Visible = True
End Sub

Word's Extend key (F8) gives something similar to block processing.


Formatting and Styles

Learn about Styles - really learn!
http://www.addbalance.com/usersguide/styles.htm I resisted for years and now
regret every day of those years because although that string was still very
hard to push, it kept getting longer and longer, and had some very important
projects tied to it! Once you understand styles and the Word concept of
organizing things into Chinese boxes everything falls into place and instead
of pushing a string, you can push a button that turns on the very powerful
text processing machine known as Microsoft Word and it will start doing your
work for you instead of running around behind you trying to undo what you
just thought you did.


Converting documents Word / Word Perfect

Some special characters in Word Perfect documents don't convert well to
Word. There is a macro to assist with this described at
http://www.columbia.edu/~em36/wpdos/wptoword.html#macroword and can be found
at http://www.columbia.edu/~em36/wpdos/WPSymbolConv.bas.
This was prepared by Edward Mendelson.
Otherwise, look at the macro from http://support.microsoft.com/?kbid=212396
Use these on _copies_!

As for converting documents from Word Perfect to _use_ in Word... In a word,
don't plan on it. I would not recommend using converted documents long-term.
They will be filled with formatting anomolies that will get you at the worst
time. This is especially true of any documents containing automatic
numbering or bullets. Try recreating form documents in Word using the
following process:
In Word Perfect (if you still have it, in Word if not) save your files as
text files.
Use your converted files as references to show you how you want your
formatting to look.
Create a new document in Word and insert the text from the text file. Save
this new document as a Word template. Format it the way you want using
styles, not direct formatting. Save it again.
To use a template within Word, use File => New and pick your template. This
will create a new document for you.

Merge documents have special problems and should be recreated from text
files or retyped in Word. To convert data files, consider generating labels
in WP as a document, converting that to Word, and then using
http://www.gmayor.com/convert_labels_into_mail_merge.htm to get a new Word
data file.

Note that conversions usually do create documents that look passable and
print OK; the problems I'm referring to have to do with editing / making
changes, that is, using the documents long-term. (See below on reusing
documents vs. using templates.)

Conversion back to Word Perfect: There is a problem (in addition to the ones
mentioned for conversion _to_ Word) with Version 2002 (XP) and later of
Word. The conversion file only works for conversion _to_ Word, not from Word
to Word Perfect! Earlier versions went both ways. To fix this, you need to
find the old conversion file WPFT532.CNV from a Word 97 or Word 2000
installation and copy it to your new installation, replacing the file of the
same name. Note, the change making the file one-way was done as a security
measure. While I don't know of any problems the old file causes, keep the
new installation's file somewhere as a backup just in case.


Boilerplate and Forms

In WP a lot of people use macros to hold chunks of text - boilerplate. In
Word this function is filled by Templates, AutoText and AutoCorrect, not
macros. Follow the links at
http://addbalance.com/word/wordwebresources.htm#AutoText for more
information on these tools.

You can use FILLIN and ASK fields or UserForms to query the user. For more
about online forms, follow the links at
http://addbalance.com/word/wordwebresources.htm#Forms or
http://word.mvps.org/FAQs/Customization/FillinTheBlanks.htm especially Dian
Chapman's series of articles. You may also want to look at
http://www.word.mvps.org/FAQs/TblsFldsFms/LinesInForms.htm.


Reusing Documents vs. Using templates

General practice in WP is to have a document and copy and edit it to create
a new document. This is not good practice in Word. In Word, construct a
good, tight, template for your documents and use that template when
constructing new documents. Among other things, this can avoid embarrassing
"metadata" (http://www.addbalance.com/usersguide/metadata.htm) and things
like surprise headers and footers from creeping into new documents.

It's a lot of reading, I know. It's OK to chunk it down and do a bit each
day, but I would recommend that you make it a top priority to do that bit
each day. In the (short) long run, it will save you both time and grief.
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs which is awesome!

My criminal law site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Word uses macros in an entirely different way to WP. What exactly are you
trying to achieve?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back in 1994, I used WP5.1 extensively. I used macros everyday. Three of
the macros that I programmed were letters that required user input in various
sections. One macro took about 2 minutes to program and saved so much time
when I ran it. In 3 days, I had printed out the same amount of letters and
addressed envelopes, that took another person (who didn't understand macros)
3 three weeks to do the same amount. I am trying to accomplish that same
macro in MS WORD.
 
I know. I know. I feel for you. I had WP macros that were hundreds of lines
and interactive. In Word you can create interactive macros. What I am
telling you, though, is to first learn how Word does things. What you are
trying to write a macro for can probably be done much more simply either
without one or with one that uses features you haven't considered.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide




--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
I have saved documents as templates. It is frustrating when working on 25
long documents, different text needs to be inserted in each one, and they
need to be completed in 2 hours. I have tried using ??? for the spots that I
am to insert text; then I use FIND and key in the text. It takes too long
and I have to read each document to ensure that I am inputting the correct
text in the correct spot. In WP5.1, I would activate the macro; the cursor
would be at the spot for text to be input; I’d input the text and hit ENTER
for the cursor to stop at the next insertion point. When the letter was
finished, the macro copied the address to the envelope and printed both the
letter and the envelope. It took about 3-4 minutes to complete each letter
from start to finish. That’s what I want to accomplish with MS WORD.
 
You could do that with form fields in Word or with a UserForm.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
First, take the time to go through the links I gave you. You need to do
this - for your sanity - and to do your job. You don't have to do it all at
once but it should be a high priority, at least half an hour a day. Delaying
on this will result in you and those you work with who use your work doing a
lot of extra work!

Take a look at macrobutton fields as placeholders. See
http://www.addbalance.com/usersguide/fields.htm#MacroButton,
http://www.gmayor.com/Macrobutton.htm and
http://www.mvps.org/word/FAQs/TblsFldsFms/UsingMacroButton.htm for more
about macrobutton fields. The F11 key advances automatically to the next
field.

Take a look at AutoText and the AutoTextList field.

Take a look at what Word calls an "online form." Check this in help. For
more about online forms, follow the links at
http://addbalance.com/word/wordwebresources.htm#Forms or
http://word.mvps.org/FAQs/Customization/FillinTheBlanks.htm especially Dian
Chapman's series of articles. You may also want to look at
http://www.word.mvps.org/FAQs/TblsFldsFms/LinesInForms.htm.

Hope this helps,
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide




--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Thank you so much. I have created a simple letter that needs user input and
it works. Now I will program a macro to access the letter and I will be set.
Although I had formal training for WP and WANG, I am self-taught in MS. I
didn't bother to read about online forms because I thought they were only to
be used online. I usually figure things out easily, but this one thing has
had me perplexed for 2 years.
 
Thank you so much. I have created a simple letter that needs user input and
it works. Now I will program a macro to access the letter and I will be set.
Although I had formal training for WP and WANG, I am self-taught in MS. I
didn't bother to read about online forms because I thought they were only to
be used online. I usually figure things out easily, but this one thing has
had me perplexed for 2 years.
 
I'm not sure why you would need a macro to access the letter. It should be a
template that would appear in the File New dialog.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
It's quicker to use ALT A instead of File, New, and scrolling to the template
that I need to open. I always look for ways to save time. For me, it's
easier to run the macro, type the text, unprotect the document and use ALT W
to copy the inside address for the envelope and printout both the letter and
the envelope.
 
Still, do it with a template. You can access templates with a keyboard
shortcut or menu if you want. http://addbalance.com/word/templatesmenu.htm.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide




--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Back
Top