Removing a line

Author Message
longie

  • Total Posts : 6
  • Scores: 0
  • Reward points : 0
  • Joined: 11/21/2006
  • Status: offline
Removing a line Monday, May 21, 2007 10:06 PM (permalink)
0
Hello,

I am trying to write a program that opens a word object, if it cant find the specified keyValue that it removes the line i.e. the keyvalue is replaced by removing the line. Alternatively I could create a list but specify a new line '\n' at the end of each list

1) abc
2) abc
3) abc

at the moment it comes out with 1) abc 2) abc 3) abc

With objWord.Selection.Find
         .ClearFormatting
         .Replacement.ClearFormatting
         .Wrap = wdFindContinue
         .Text = "[#Q1ANS#]"
         .Replacement.Text = keyValue
         .Execute ,,,,,,,,,,2
     End With
 


 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: online
    RE: Removing a line Tuesday, May 22, 2007 1:52 AM (permalink)
    0
    What language are you doing this in? Where is the value of keyValue set?
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      longie

      • Total Posts : 6
      • Scores: 0
      • Reward points : 0
      • Joined: 11/21/2006
      • Status: offline
      RE: Removing a line Tuesday, May 22, 2007 2:36 AM (permalink)
      0
      Hello,

      The keyValue is passed down from another method. Here is my current working solution:

       .Replacement.Text = "Test" + "^p"
       


      The vbCrLf attribute does not work as it procedures the cariage return but adds special character.

      I'm using VBS through JSP.
       
      #3

        Online Bookmarks Sharing: Share/Bookmark

        Jump to:

        Current active users

        There are 0 members and 1 guests.

        Icon Legend and Permission

        • New Messages
        • No New Messages
        • Hot Topic w/ New Messages
        • Hot Topic w/o New Messages
        • Locked w/ New Messages
        • Locked w/o New Messages
        • Read Message
        • Post New Thread
        • Reply to message
        • Post New Poll
        • Submit Vote
        • Post reward post
        • Delete my own posts
        • Delete my own threads
        • Rate post

        2000-2012 ASPPlayground.NET Forum Version 3.9