#1   Report Post  
SKW
 
Posts: n/a
Default Repost - Macro Help.

I posted previously but I cannot seem to find the post, so here I go again.

I am trying to write a macro to do the following:

1. Create a New Word File
2. Paste a Table from Excel
3. Select the Table
4. Format the Table
5. Search the cells in column 2 and add the text "Elevation: " at the
beginning of any cell that has text in it.

Now, I have written this macro and everything is working fine except for
step number 5. I cannot seem to generate the code needed to search through
the cells and add the text only to the cells that have text in them already,
as I do not want "Elevation: " to appear in empty cells. Any help or
suggestions are greatly appreciated.

SKW
  #2   Report Post  
SKW
 
Posts: n/a
Default

I just realized that I wasn't exactly clear in what i wanted step 5 to do. So
here is some clarification.

(I'm not too clear with the code jargon, so please forgive the wording)

IF cell = empty THEN go to the next cell, unless this is the last cell, then
go to the next step.
Else
Homekey, Type "Elevation: "
Repeat this step.

Basically: I'd like it to first check and see if there is text in the cell.
If there is, then I would like it to insert that text and then repeat on the
next cell down in the column, unless that is the last cell in the column, in
which case I would like it to go to the next step of the macro. If it is
empty, I would like it to go to the next cell in the column and repeat unless
the it is the last cell in the column, in which case I would like it to go to
the next step in the macro. Thanks.

SKW

  #3   Report Post  
SKW
 
Posts: n/a
Default

Anyone have a suggestion?
  #4   Report Post  
Daiya Mitchell
 
Posts: n/a
Default

You'd probably get a faster and better response posting in a group with
Programming or VBA in the name (as well as Word in the name), as that's
where the macro experts hang out.

Also, be sure to state your version of Word--also, no one can figure out why
the code doesn't work if you don't show them your code.


On 7/27/05 1:41 PM, "SKW" wrote:

Anyone have a suggestion?


--
Daiya Mitchell, MVP Mac/Word
Word FAQ: http://www.word.mvps.org/
MacWord Tips: http://www.word.mvps.org/MacWordNew/
What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table in a Form HiDbLevel Tables 12 February 27th 06 12:59 PM
Macro Button Won't Stay on Toolbar caleb Microsoft Word Help 2 June 14th 05 11:59 PM
Possible bug when recording a Word Macro Raven95 Microsoft Word Help 4 April 30th 05 09:49 PM
Running document macro from server Intravler New Users 0 March 4th 05 04:33 AM
2000 to 2002 macro and "Could not open macro storage" Art Farrell Mailmerge 1 December 6th 04 12:40 PM


All times are GMT +1. The time now is 04:18 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"