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)
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
|
|
|
|
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)
What language are you doing this in? Where is the value of keyValue set?
|
|
|
|
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)
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.
|
|
|
|