Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Mar 2009
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    I need to select some text in my document by using macro.

    While recording the macro, I do select the text, but when i run the macro it does not show the selection.

    is it possible to do this task with macro?

    regards
    abhilasha

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Word VBA has several methods for selecting text. Can you explain what you want to accomplish?

  3. #3
    Lounger
    Join Date
    Mar 2009
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ya, actually while performing language review we need to give comments in a pre-defined format.

    some part of the Format is like this;

    Suggestion:
    <Please add suggestion here>

    now is it possible that as user click the macro button, comment window will open up and the above given highlighted text appears as selected text, so that user can start typing the suggestion, instead of deleting first the written text.




    [quote name='HansV' post='784319' date='13-Jul-2009 16:42']Word VBA has several methods for selecting text. Can you explain what you want to accomplish?[/quote]

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Here's a possible solution:
    - Select the text "<Please add suggestion here>"
    - Insert a bookmark, let's say you name it Suggestion.
    - In your code, select the text as follows:

    ActiveDocument.Bookmarks("Suggestion").Select

Posting Permissions

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