Re: Find First Clear Cell in a Word Table

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS (dkr_at_mOSTvALUABLEpROFESSIONALs.org)
Date: 03/03/04


Date: Wed, 3 Mar 2004 17:29:30 +1000

Use

    Dim myrange As Range, today As String
    today = Format(Date, "dddd, MMMM dd, yyyy")
    Selection.HomeKey wdStory
    Selection.Find.ClearFormatting
    With Selection.Find
        Do While .Execute(FindText:=today, MatchWildcards:=False,
Wrap:=wdFindStop, Forward:=True) = True
            Set myrange = Selection.Range
            myrange.End = myrange.End + 1
            myrange.Collapse wdCollapseEnd
            myrange.Select
        Loop
    End With

-- 
Please post any further questions or followup to the newsgroups for the 
benefit of others who may be interested.  Unsolicited questions forwarded 
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
"norm" <norm.12j32l@nospam.WordForums.com> wrote in message 
news:norm.12j32l@nospam.WordForums.com...
>
> Hi Doug,
>
> The format of the dates in my first column is:
> Wednesday, March 03, 2004
> and so on.
> Finding the current date and moving across one cell would work.  How
> does a macro to do that look.  I will need some help with it.
>
> Sincerely
> norm
>
>
> ------------------------------------------------
> ~~ Message posted from http://www.WordForums.com/ 


Relevant Pages

  • Re: Combining tables from within a document and across multiple docs.
    ... >> I think I would dim a range object, set a range to the .Range of each ... >> Please post any further questions or followup to the newsgroups for the ... >> Doug Robbins - Word MVP ...
    (microsoft.public.word.tables)
  • Re: Text to lowercase
    ... >> Please post any further questions or followup to the newsgroups for the ... >> Doug Robbins - Word MVP ...
    (microsoft.public.word.newusers)
  • Re: insert picture from external file
    ... Please post any further questions or followup to the newsgroups for the benefit of others who may be interested. ... > one question if a image doesn't exists how would allow for this in the code> what I tried only came up with an error> cheers phil ... >> Doug Robbins - Word MVP ...
    (microsoft.public.word.vba.userforms)
  • Re: Buttons & Menus "Greyed out" & dont work
    ... Please post any further questions or followup to the newsgroups for the ... Doug Robbins - Word MVP ... > are all "greyed out" and no selections can be made. ...
    (microsoft.public.word.docmanagement)
  • Re: Find First Clear Cell in a Word Table
    ... the newsgroups through Rubin's crappy website. ... Doug Robbins - Word MVP ... "norm" wrote in message ...
    (microsoft.public.word.vba.beginners)