+ Reply to Thread
Results 1 to 3 of 3

Cell Selection Macro in Word Help

  1. #1
    Registered User
    Join Date
    08-25-2017
    Location
    london, england
    MS-Off Ver
    office mac 2016
    Posts
    1

    Cell Selection Macro in Word Help

    Hello all!

    I have a document in which I need to select a cell, add comment, select next cell, add comment, etc

    I was wanting to make a macro to automatically do this for me, problem is the tables vary by overall number of rows, and they will never be the same. Is there a way to create a macro to do this for me?

    Also if I select row 1, column 1 and add a comment, then i will need to select row 1, column 2 to add a different comment.

    This code works, but doesn't give me range

    Sub Macro1()
    '
    ' Macro1 Macro
    '
    '
    ActiveDocument.Tables(1).Columns(2).Cells(1).Range.Select
    Selection.Comments.Add Range:=Selection.Range
    Selection.TypeText Text:="rn"
    ActiveDocument.Tables(1).Columns(2).Cells(2).Range.Select
    Selection.Comments.Add Range:=Selection.Range
    Selection.TypeText Text:="rn"




    End Sub

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Cell Selection Macro in Word Help

    Try something based on:
    Please Login or Register  to view this content.
    As coded, the macro starts from wherever your insertion point is - meaning you can exit & re-start later - and you can skip over cells you don't want to add comments to.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Cell Selection Macro in Word Help

    Cross-posted at: http://www.vbaexpress.com/forum/show...o-in-Word-Help
    Please read Excel Forum's Cross-Posting policy in rule 8: http://www.excelforum.com/forum-rule...rum-rules.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 10-02-2016, 03:03 PM
  2. [SOLVED] Help with macro to find a specific word and replace the entire cell with the return word.
    By BG1983 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-24-2015, 09:40 PM
  3. [SOLVED] Cannot get word Selection object from within Excel macro
    By MattyChan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2012, 06:25 PM
  4. Replies: 1
    Last Post: 03-02-2010, 01:23 PM
  5. selection to color cell if the word promise is in cell
    By DKY in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-20-2006, 02:37 AM
  6. [SOLVED] Macro help on Cell Selection
    By Nigel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-27-2005, 08:06 AM
  7. macro to copy selection and paste special as picture in word
    By rabbi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2005, 09:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1