Over 1 million tech questions and answers.

Solved: Word Macro Loop of 1) Find 2)Select line 3)Delete line 4)find.

Q: Solved: Word Macro Loop of 1) Find 2)Select line 3)Delete line 4)find.

Hello

I have a need to find a text of X in a document go to end of line select whole line and delete line and then find next X in document. With 3500 X Id like to loop till end of document. In 2010 my (pc at home) the find X part of a recorded Macro does not show up. In 2007 it shows up so I can see how it works at office. I just need to know how to loop, the above of instruction "find X, select whole line, delete, find next X" and loop this.

Eg

YYYY 1
AHKJUSKL XX
AGSJUJ ()*(IO XX
ASJ
L:JOPO
AKLSJXX
DADAD

needs to look like

YYYY 1
ASJ
L:JOPO
DADAD

using XX as the reference of which line to delete.

Cheers
Al

RELEVANCY SCORE 200
Preferred Solution: Solved: Word Macro Loop of 1) Find 2)Select line 3)Delete line 4)find.

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Solved: Word Macro Loop of 1) Find 2)Select line 3)Delete line 4)find.

Read other 6 answers
RELEVANCY SCORE 125.2

I have Word 2003. I do a lot of literature reviews, copying and pasting from .pdf files. When I do this, the text is pasted into word only filling a partial page. I want the text to completely fill a line within the margins. So I manually go to the end of a sentence, hit the space bar once, the delete once to delete the new line/paragraph marker. Sometimes I have to do that twice. Then I go to the next sentence and repeat the steps until it is all completed. It seems this would be a good use of a macro. I can record a macro and go through these steps once but not looping through every line until the end. Can someone please help?

Zeda
 

A:Solved: Looping Line by Line in Word Macro

Read other 6 answers
RELEVANCY SCORE 120

Aloha...

I have a Word 2007 manuscript with headings styled as heading1.

I need to append <HA> to the beginning of each heading, ie:

Trapping Errors
<HA>Trapping Errors

If the line had no style, I could probably use the wildcards ^13*^13 in Find and Replace. However, since the line is a different style from the body text before and after it, the first ^13 is not found.

Any ideas how I can do this? Please?

(The ultimate goal is to run a macro to do this for each chapter of a 600+ page book.)

TIA.

tanalee
 

A:Solved: MS Word: Find and replace line using wildcard

Aloha...

I barely know a thing about VBA, but with help, managed to put this together. It's not pretty, but it works. : )

Sub MarkHeadingsForEditor_ori()
Dim foundText As String
Dim newText As String
Dim blnFound As Boolean

Do
blnFound = False

With Selection.Find
.Style = ActiveDocument.Styles("heading1")
.Replacement.Style = ActiveDocument.Styles("heading1")

.Text = ""
.Replacement.Text = ""
.Forward = True
.Format = True
.MatchWildcards = True

End With

blnFound = Selection.Find.Execute ' after this line is executed, the heading1 text is selected
If Not blnFound Then Exit Do

foundText = Selection.Text ' ie, Testing VBA Procedures
Debug.Print foundText

newText = "<HA>" & foundText ' ie, <HA>Testing VBA Procedures
Debug.Print newText ' the text is replaced

With Selection
.Text = newText ' the new text is inserted
.Style = ActiveDocument.Styles("heading1") ' the heading1 style is restored
End With

Loop While blnFound
End Sub
 

Read other 1 answers
RELEVANCY SCORE 109.2

I have a document that has a random horizontal line at the bottom of one page (above the footer). There is no shading or borders in the document. I cannot select the line (it appears to be in a text box, but I can't select the text box either). I need to remove the line. It is only one one page. This is in Word on a Windows XP operating system.
 

A:Solved: Random horizontal line that can't select or delete

If you can't select the line why not select everything else on the page and cut and paste that to a new replacement page and then delete the old page with just the line left on it.
 

Read other 2 answers
RELEVANCY SCORE 101.6

In Word 2000 I was setting up a layout for on of my business forms. I created a long line with underscores. This worked however I created another line with underscores and it made this bold line a cross the page that I can't delete! You can move it up and down with the mouse but you can't delete it. Anyway one know why or how to fix or delete this? I wanted to also know if there was a way to make lines and make the line up on the right margin. This is what happens:

Name: __________________ Date:____________
__________________________________________
See how it doesn't line up on the right side. Is there a way to do a half underscore? Any ideas?

Thanks,

Jnar
 

A:(solved) Word 2000: Can't delete line!!

Read other 7 answers
RELEVANCY SCORE 98

I am running Windows 7 and Windows 10 on side by side notebooks. I have used Win 7 and Word a long time. but I just learned something about Word when I noticed a strange behavior - select to end of line is not working as expected. After testing, I determined that this behavior is the same in Word 2010 on both operating systems.

Normally, Shift-End will select text from the current cursor position to the end of the line.

However, in outline mode, the Shift-End selects the entire line. I find this very disturbing and unproductive.

Having discerned this is a [bad] feature if not a bug, and certainly not specific to Windows 10, is there a way to fix it so that I can select "to end of line" not "entire line" in outline mode?

Cheers

Read other answers
RELEVANCY SCORE 97.2

I was wondering if a user enters a order number into a form and if a column for example has various Order Numbers and the order number can appear more than once in the column, is there a way to code that lets you find the last duplicate order number that was enter in the column and then insert a row right after that row?

so basically if there was a column with 30 order numbers in it and the user enters say 09-009 in the text box on a form. If the PO Number entered matches the PO Numbers on the Invoice_Log tab then it will find the last occurrence of the PO Number and then inserts a line and enters the remaining fields that the user enters once the user clicks the add button. Below is the example spreadsheet.
 

A:Solved: Excel/VBA: Find Last Occurence in Column by criteria then insert line if foun

You could use a loop from the bottom up.
Code:

Sub UP()
Dim LRow As Long, x As Long
LRow = Cells(Rows.Count, "B").End(xlUp).Row
For x = LRow To 2 Step -1
If PO = Cells(x, "B") Then
'do stuff
End If
Next
End Sub

But there's a danger in that the data gets sorted, so would suggest you expand it with second search using the dates in your data.
 

Read other 3 answers
RELEVANCY SCORE 96

Hope I can explain my problem. I want to create a macro in Word 2007. Is it possible that within my Macro Recording that I can hit the Ctrl+F (for find) but also at the same time and before I launch the Find, to somehow indicate to hold down the shift key (in order to highlight/select everything from where I start my Find to the final spot in my document that I search for?

If this is too ambiguous or not understandable, PLEASE let me know and I'll try to restate. Here's an exact example of what I'm trying to do:

PREOPERATIVE DIAGNOSES:
1. Umbilical hernia.
2. Need for intraoperative mesh.

POSTOPERATIVE DIAGNOSES:
So my macro will enable me to start from the second heading right after the colon. Then record macro with a Find (up) to the : at the first heading, then Find with/shift key-select (down) to copy 1 and 2, and then paste them to the second heading.

I can figure out all the intricate ways to do that EXCEPT I can't figure out how to within the macro, enter Find+Shift (select)

Thanks for reading and for any thoughts, suggestions, etc.
 

A:Solved: Word 2007 Macro Find + Shift

Well, I figured out my own question. The answer is that I simply have to first hit the F8 key, which "turns on" the select function. Then I can hit the Ctrl+F (search/find) key and enter the place to where I want to find, and it not only goes to that place, but also at the same time selects/highlights everything from starting point of Find to the finish point.

So that's exactly what I needed to do, and F8 was the answer I was looking for. Hope this helps someone else as well.
 

Read other 1 answers
RELEVANCY SCORE 93.2

Hiya all,

I have been having lots of probs with my pipe recently, and need to fairly urgently find out the db of my adsl line.

I can't find any testers online or software brassed, and my router doesn't seam to display it.

Any hints please? Im fairly desperate!
Anything is much appreciated!
 

A:Find out the db of my ADSL line???!

Read other 8 answers
RELEVANCY SCORE 93.2

OS: Windows XP Home
Hard Drive: 40 GIG
Processor: 2 GIG

*If any more information is needed, please just ask.*

I was tryign tot set up an internet account for a friends computer. Apparently the modem is in COMM PORT 3, but when you go to device manager it give you COMM PORT 1, COMM PORT 2 and LPT (Printer Port).

Apparently the COMM PORTS 1 & 2 are in use. But no COMM 3 isn't on the list. The Intel 536 modem is the only modem in the computer, and the dial up doesn't pick up a tone.

Anyone have any ideas on how to fix this?
 

A:Modem Can't Find Line

Find out what make of modem it actually is and download the latest driver. Try Windows Update. It might pick up your modem and offer an updated driver.
 

Read other 3 answers
RELEVANCY SCORE 92.8

Hello

I would like to know if its possible (and how to do it if so) to justify a paragraph of text in Word 2007 to gradually get narrower.

What I mean is, id like the first line of text to be longer than the one after and so on until I end up with something like this:

-----------------------------
-------------------------
--------------------
----------------
----------
I cant seem to use simple spacing or margins as they effect the entire text? Please help

Ok that example above has not come out right

I want the 2nd line to start further to right of first line and end closer to left and so on. Im struggling to show an example but hope you know what I mean. Basically centre justified but going down in a V shape

A:Line by line justification of text in Word 2007

I know this doesn't do exactly what you are looking for, however it is the only resolution I can think of:
How to Create multilevel list styles in Microsoft Word 2007 ? Microsoft Office

Read other 1 answers
RELEVANCY SCORE 92

Hi Guys,

Needing some serious help here, got a samsung n110 netbook running windows 7, i've been trying for several frustrating hours to firstly find the line in and make it the default setting. I need to record some audio but it keeps recording through the MIC, i can't find any other option throughout the control panel,

can anyone help me?

thanks

A:Help needed, Can't find the line in option anywhere!

  
Quote: Originally Posted by henerz330


Hi Guys,

Needing some serious help here, got a samsung n110 netbook running windows 7, i've been trying for several frustrating hours to firstly find the line in and make it the default setting. I need to record some audio but it keeps recording through the MIC, i can't find any other option throughout the control panel,

can anyone help me?

thanks


On my PC, when I right click the sound icon on the taskbar,appears recording devices,and there is and line in option,right click that, set as default device...and couple of more options in that dialog window

Read other 1 answers
RELEVANCY SCORE 92

Do you know any way to find the command-line switches of a program. For example, I noticed that the Avira command on start up is "C:\Programs\Avira\AntiVir Desktop\avgnt.exe" /min". I want to find out if it is possible to find out the command at the end (in this case "/min")
 

A:Find a Command-Line Switch?

Read other 10 answers
RELEVANCY SCORE 91.2

I have created a nine page document in Word 13. (OS is Windows 10.) While editing, I intended to draw a dividing line in the pages consisting of several asterisks. In doing so, the line converted itself into a dotted line of bold black squares extending the entire width of the pages.
Now, that black line ubiquitously inserts itself in various unexplainable locations throughout my document. I cannot delete it; I cannot control it. I cannot find any Help information regarding it.
What have I done? How do I get rid of it?

A:Can't Delete Bold Line Across Page in Word 13

Are you using only English-language Fonts in the document? Have you tried deleting the lines manually [it may be tedious]?

A note: there is no Word 13, but you probably meant Office 2013 which contains Word Version 15 along with other applications in the suite. Office 2010 is version 14. I have 2010 on a Desktop and 2013 on a Notebook. Office 2007 contained version 12 for the applications. There's small differences between the versions, sometimes important, sometimes not. Click File, Help to see the version.

Read other 1 answers
RELEVANCY SCORE 90.8

This is clearly a stupid question as all the documentation I've reviewed assumes it's intuitive. They all get specific about the "$ pear" commands but don't tell me where to put them.

I know that $ pear doesn't work in the XP command line (run - cmd) regardless of the current directory I use.

An example from one documentation source:
You can check [the installed location] using the pear command line application:
$ pear config-get php_dir
/usr/local/lib/phpClick to expand...

Can you give me a step by step starting from my xp desktop? (my Pear Package is in C:\xampp\php\PEAR)

Thank you,

Grnadpa Brian
 

A:Where do I find the pear command line application?

Is that even available for Windows?

I have it here, but I run Linux.

The syntax in the command that you list as an example, and in the response, is *nix syntax.
 

Read other 2 answers
RELEVANCY SCORE 90.8

The soundrecorder icon shows up in the system tray for the time I specify, but the file does not show up in C:\Users\User Account Name

a search turns up nothing as well

any ideas?

A:SoundRecoder run from command line - can't find file

Hi siridas and welcome to TSF,

What exactly are you trying to do? Is the issue with opening the application, or trying to locate the recorded file?

Read other 8 answers
RELEVANCY SCORE 90.8

Hi there,
I recently discovered how to download youtube videos manually by looking at the source code, and searching for specific encrypted url's which contain either the video or audio.

I want to make myself a batch file to make this process easier in the future, so here's what I want to do...

Search a file called "source.txt" (located in the same folder as the batch) for 3 different audio quality tags to see if they exist (some youtube videos will only contain "medium bitrate" quality audio, and so the source only contains that tag".
The three different tags are: "itag%3D139"(low bitrate audio), "itag%3D140"(medium bitrate audio) and "itag%3D141"(high bitrate audio).
___________________________________________________________
SEARCH:
So the batch should search for the highest bitrate file first (itag%3D141), and if it exists, return a user input saying "high bitrate audio was found. continue?(y/n)"
If that tag is not found, search for the next one down, and so on.
If user inputs "y" "GOTO DOWNLOAD". If not, "EXIT".

DOWNLOAD:
Ok, so now that the tag has been found, and the user has hit "y", the batch should now go back to that line in the text, then search for the first "\" symbol occurrence after that tag. The reason we are looking for the "\" is because this is the end of the URL we need to copy.
Once the batch finds the first \ that com... Read more

A:Find a specific line in text using batch - Need Help

While I'm at it,
If someone could give any suggestions, I'm looking for a way to automate copying the source code from a youtube video URL to file using console?

I have tried this Wget code, but it seems to not be able to extract it...
(wget" --no-check-certificate youtube.com/watch?v=n1GUQVo1Lps -o code.txt)
 

Read other 1 answers
RELEVANCY SCORE 88.8

This macro below works like magic (beats do loop hands down) except that it don't include how to only select whole words and due to a few sandwiches short of a picnic I don't know how to make it so. It looks through a list super fast and picks out what is wanted say eg, 'Bank fund" from a cell with a long sentence in it like eg bank

CR COMMONWEALTH - From: NETBANK Ref: REFUND
CR COMMONWEALTH BANK fund N - From: NETBANK Ref: REFUND

because there is no whole word find built into the macro it gives wrong results in some cases where the word bank is part of another word.

Set R = .Find((" " & Company1 & "")) does not do the trick

the macro:-

Sheets("zoo").Select
Application.ScreenUpdating = False
Dim R As Range, FindAddress As String

'Set the range in which we want to search in
With Sheets("zoo").Range("b39:b3000")
'Search for the first occurrence of the item
Set R = .Find(Company1)

'If a match is found then
If Not R Is Nothing Then
'Store the address of the cell where the first match is found in a variable
FindAddress = R.Address
Do
R.Cells(1, 2) = company1
Set R = .FindNext(R)
'Search for all the other occurrences of the item i.e.
'Loop as long matches are found, and the address of the cell where a match is found,
'is different from the address of the cell where the first match is found (FindAddress)
Loop While Not R Is Nothing And R.Address <> FindAddre... Read more

Read other answers
RELEVANCY SCORE 88.4

Hi,
I need to add an empty line between each of the rows I have populated on a spreadsheet (Microsoft Excel 2000)

Example:
select line 2, insert row, format the cells on the new line 2.
select line 4, insert row, format the cells on the new line 4.

I need to repeat this process for hundreds of rows and don't want to have to do it manually.

I created a macro to do this but was wondering if someone could help me with a command that would automatically increment to the next even line without me having to write it out as I did below.

Any help would be much appreciated. A programmer I'm not. Thanks K2
Rows("2:2").Select
Selection.Insert Shift:=xlDown
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Rows("4:4").Select
Selection.Insert Shift:=xlDown
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEd... Read more

A:Solved: incrementing a line Macro help

Click in a cell in the row that you want to start in and run the following macro.
Code:
Public Sub InsertRows()

Do Until ActiveCell.Row = Cells(Rows.Count, "A").End(xlUp).Row + 1

Rows(ActiveCell.Row).Insert Shift:=xlDown
Rows(ActiveCell.Row).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
ActiveCell.Offset(2, 0).Select
Loop

End Sub
Rollin
 

Read other 2 answers
RELEVANCY SCORE 87.6

I have written a macro in MS Word that basically checks items off a list. It is based off of the seach and replace function, all it does is serach for a term and when it finds it changes it's color to blue and makes it strikethrough. I don't know if this is the most efficient way of doing it but this is the way I've come up with.

What I would like to add to it is the ability to have it tell me when the term is not found in the list, and possibly add it to the bottom of the list in a red color or something. Anyone know how I could do that?

Here is the macro code:
Sub CrossOff()

For x = 1 To 5 'Find and replace 5 times

SearchTerm = InputBox("Word to search")

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting

With Selection.Find
.Text = SearchTerm 'Word to search for
.Replacement.Text = SearchTerm 'Replace with same word, different formatting
End With

'Selection.Find.Replacement.ClearFormatting

With Selection.Find.Replacement
.Text = SearchTerm
.Font.Color = wdColorBlue 'change the text to blue
.Font.StrikeThrough = True 'cross it out
End With

Selection.Find.Execute Replace:=wdReplaceAll

Next x

End Sub
 

Read other answers
RELEVANCY SCORE 87.6

I want to create a customised 'find and replace' function that
uses a userForm similar to the word find and replace dialog box
but with the following Extras:

option radio buttons 'Left', 'Right', 'Both'
so for example if the 'left' radio button was checked and the
text to be replaced is '#' then all the text left to the '#'
including the '#' on the same line would be replaced.

Hope this is clear.

Thanks in advance.
 

Read other answers
RELEVANCY SCORE 87.6

I have written a macro in MS Word that basically checks items off a list. It is based off of the seach and replace function, all it does is serach for a term and when it finds it changes it's color to blue and makes it strikethrough. I don't know if this is the most efficient way of doing it but this is the way I've come up with.

What I would like to add to it is the ability to have it tell me when the term is not found in the list, and possibly add it to the bottom of the list in a red color or something. Anyone know how I could do that?

Here is the macro code:
Sub CrossOff()

For x = 1 To 5 'Find and replace 5 times

SearchTerm = InputBox("Word to search")

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting

With Selection.Find
.Text = SearchTerm 'Word to search for
.Replacement.Text = SearchTerm 'Replace with same word, different

formatting
End With

'Selection.Find.Replacement.ClearFormatting

With Selection.Find.Replacement
.Text = SearchTerm
.Font.Color = wdColorBlue 'change the text to blue
.Font.StrikeThrough = True 'cross it out
End With

Selection.Find.Execute Replace:=wdReplaceAll

Next x

End Sub
 

Read other answers
RELEVANCY SCORE 87.6

Each and every time I boot-up my computer, I am prompted to select between "Windows XP Home Edition" and "(Backup Line) Windows XP Home Edition". Everything works fine with either selection. Is there a way I can bypass or select "Windows XP Home Edition" by default?
 

A:Solved: Help - Prompted to Select Backup Line for Windows XP every startup

You're going to have to edit your boot.ini file located in C:\
Double-click on this file to open it in Notepad. Is the (Backup Line) line listed?
If so, delete this line. Your boot.ini file should now look something like this, especially the [operating systems] section:

[boot loader]
timeout=15
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect

Double-check what you have done before saving the changes.
 

Read other 2 answers
RELEVANCY SCORE 87.6

I am trying to create a macro (total novice at this) that will search for a word in a column and wherever it finds that word will insert a row below that. My worksheets range in size from 200- 3000 lines of data with 12 columns accross. The word can usually fall into the third column. Any help would be greatly appreciated. Thank you!
 

A:Solved: Macro to Insert a Line in Excel

Read other 9 answers
RELEVANCY SCORE 87.2

The title tells it all...I went to use my Line In (blue) on the back of my Inspiron 3847, and it is now listed as a Speaker (Line Out) port.
Anyone know how to remap it? Or anything that I can do to get my Line In?

Read other answers
RELEVANCY SCORE 86.8

hello guys,

i would like to ask for your kind help.

i need to find and delete all lines starting with a number then a period. For example:

1. some text hereClick to expand...

other example:
3. other text hereClick to expand...

other example:
2. bla bla blaClick to expand...

hope you are able to help me.

thanks.
 

A:[Word Macro] How to find lines starting like this ?

Read other 7 answers
RELEVANCY SCORE 86.8

Hai, I am working in a data processing company.

Please tell me how to find a bold paragraph in the microsoft word document using macro and also bold text in the paragraph in the microsoft word document, so that i can replace this bold paragraph and bold text to other formatting.

waiting for ur response as soon as possible.

Martin Nadar
 

A:Find Bold Attribute with Macro in Word

Hello Martin, welcome to TSG.

I'm going to ask a moderator to remove your duplicate post and create a new thread from your original post. We ask that you try not to duplicate posts, as it often confuses those trying to assist you and weakens the support effort by diffusing resources.

Also, you may want to remove the email addresses from your posts; spambots troll message boards for email addresses, so you're likely to get hit by a lot of spam if you don't remove those URIs.

chris.
 

Read other 3 answers
RELEVANCY SCORE 86.8

We commonly use one of the following placeholders to indicate something to check before completing a document. I would like to build a macro that is initiated when printing or saving that searches for:

? and red text and highlighted text.

I want it to start searching at the beginning of the document and let the document author modify the text or click Next - as he could if the Find routine was run from the drop-down menu.

Can anyone suggest the right code?
 

Read other answers
RELEVANCY SCORE 86.8

Call me a Luddite, but Word 2000 does what I want (most of the time) and I can format routine documents nearly automatically.

I know that I once had a very useful "Edit Paste Special Unformatted Text" assigned to 'CTRL SHFT V.' I think I lost it when I reinstalled Office after installing Win 7/Pro x64 in the spring of 2014. I've put off trying to find it or recreate it, but it was a very useful macro.

I know that I have copies of my OS/Programs drive on an external HDD from before 2014 that should contain the macro. I've looked using ZTreeWin and cannot find it. I used 'show all' for all the *.dot files.

Should I be able to find the 'CTRL SHFT V' hot key in one of these template (*.dot) files? If so, what syntax should I use in my search? If I find it, how to I recreate it?

I found a couple of suggested macros in the Windows Secrets archives but both macros just close the open, blank document into which I want to do the Paste Special.

Read other answers
RELEVANCY SCORE 86.8

I have an extremely large file and I need to match off values within rows that are equal to each other and delete the rows with matching values.

For e.g. Column D and Column H have the same numerical value
so the row needs to be deleted

Please help!
 

A:Macro to find duplicate values within same row and delete that row if they match

I forgot to mention that I do not want the Macro to include blanks
Only if there are actual numerical values in the cells of Column D and Column H
 

Read other 3 answers
RELEVANCY SCORE 86

I need help with a Word macro.
I would like to search a document for a string. If the string is found I want to copy the sentence containing the string to a new document.
I am using Word 2000.

Thanks.
 

Read other answers
RELEVANCY SCORE 85.6

I have a large .csv file I wish to break into smaller (5000 line) files such that

sourceFile.csv (100000 lines)

becomes

outputFile1.csv (lines 1-5000)
outputFile2.csv (lines 5001-10001)
etc till end of sourceFile.csv providing me 20 outputFiles

Any ideas?
 

A:Solved: split a 100000 line csv into 5000 line csv files with DOS batch

Read other 8 answers
RELEVANCY SCORE 85.6

Hi guys i am back yet again and prob not the last time as this site is the best.

I need a little help with my macro that i have attached and pasted below. In the attached excel file you will see multi records of the same thing. I need to only have 1 of each item listed and the duplicates deleted. Please Help

Sub DelDups_OneList()
Dim iListCount As Integer
Dim iCtr As Integer
' Turn off screen updating to speed up macro.
Application.ScreenUpdating = False
' Get count of records to search through.
iListCount = Sheets("Sheet1").Range("B1:B2000").Rows.Count
Sheets("Sheet1").Range("B1").Select
' Loop until end of records.
Do Until ActiveCell = ""
' Loop through records.
For iCtr = 1 To iListCount
' Don't compare against yourself.
' To specify a different column, change 1 to the column number.
If ActiveCell.Row <> Sheets("Sheet1").Cells(iCtr, 1).Row Then
' Do comparison of next record.
If ActiveCell.Value = Sheets("Sheet1").Cells(iCtr, 1).Value Then
' If match is true then delete row.
Sheets("Sheet1").Cells(iCtr, 1).Delete xlShiftUp
' Increment counter to account for deleted row.
iCtr = iCtr + 1
End If
End If
Next iCtr
' Go to next record.
ActiveCell.Offset(1, 0).Select
Loop
Application.ScreenUpdating = True
MsgBox "Done!"
End Sub

If you need further information please let me know.
Thanks ahead of time for the great help you all... Read more

A:Solved: Excel 03, macro for deleting duplicate line items

Read other 6 answers
RELEVANCY SCORE 85.2

Hey all,

Take for example the following text file...

a
aa
aaabaaa
madamiamadam

...

I have this code here to read the file,
Code:
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.FileInputStream;
public class FileCode
{

public static void main(String[] args) throws IOException
{

int next;
char c;
char[] message = new char[10000];
String str;
int count = 0;
Stack stack = new Stack();


String fileName = "c:\\prog4DS.dat";
FileReader reader = new FileReader(fileName);
FileWriter writer = new FileWriter("FileStuff.dat");

next = reader.read();

while(next != -1)
{
c = (char) next;
message[count] = c;
next = reader.read();
count++;
}

reader.close();

for(int i = 0; i < count; i++)
{
System.out.print(message[i]);
writer.write(message[i]);
}

writer.close();

}

}

Basically what I want is to read each line of the text file individually and store the text in its own location of an array. So for example, for the first line in the text file it is simply just an "a". I would like the program to recognize that "a", and assign... Read more

A:Solved: Reading text file line by line in JAVA - Help PLZ

Hi r3drock3t88,

The best way to read a file line by line is to use an instance of the BufferedReader class.
Example :

Code:
[SIZE=2]
List<String> list = new ArrayList<String>();
String line;
...
...
String fileName = "c:\\prog4DS.dat";
FileReader reader = new FileReader(fileName);
BufferedReader bufrdr = new BufferedReader(reader);
line = bufrdr.readLine();
while (line != null) {
list.add(line);
line = bufrdr.readLine();
}
bufrdr.close();
reader.close();
...
...
String[] array = new String[list.size()];
list.toArray(array);
[/SIZE]

 

Read other 3 answers
RELEVANCY SCORE 85.2

I have Access 93 SP2.

I have a report where I am doing calculations on each row of data in the Sub Detail_Print. What is happening is that the detail line that is to print on the top of the 2nd page and any detail line to print first on subsequent pages is having this routine executed twice.

I have created the smallest possible report which simply selects a list of order numbers. The only section is the Detail. The only line in the Sub Detail_Print is

MsgBox "OrderNumber is" & Me.OrderNumber

In Preview, I see a msgbox for each line then the ordernumber that should print at the top of the second page shows its msgbox, the first page appears, when I click the arrow to go to the next page the same msgbox appears again.

It appears that Access gets the line, executes the code, decides it doesn't fit on that page, does the new page, regets the line and re-executes the code placing it on the new page.

I could find nothing on this anywhere. Has anyone else seen this? Is there some setting I am missing?

Thank you!
 

Read other answers
RELEVANCY SCORE 84.8

Hi all

Looking for some help! Working on an excel document which contains a button I need to send to multiple people, that's fine what I need is for the subject field of the email to take the contents of a particular cell in the workbook and display that. My current code is;
Code:
Sub SendThis_ActiveWorkbook()

Dim Recip()
With ActiveWorkbook

ReDim Preserve Recip(0)
Recip(0) = "[EMAIL="[email protected]"][email protected][/EMAIL]"
ReDim Preserve Recip(1)
Recip(1) = "[EMAIL="[email protected]"]example[/EMAIL][EMAIL="[email protected]"][email protected][/EMAIL]"
.SendMail Recipients:=Recip, _
Subject:="Vacancy Authorisation " & Format(Date, "dd/mmm/yy")
End With

End Sub
Basically I want the subject to be "Vacancy Authorisation [cell contents] 01/01/2000" so I want the contents of a cell to appear in between the date and the "vacancy authorisation" part of the subject line. Assistance appreciated!
 

A:Solved: Excel email macro auto-populate subject line

Subject:="Vacancy Authorization " & Range("A1").Value & " " & Format(Date, "dd/mmm/yy")

Regards,
Rollin
 

Read other 2 answers
RELEVANCY SCORE 84.4

can anyone help, i can't seem to be able to print repeated when the line entered is exactly the same as the one before, or print farewell when a blank line is entered, this is my code so far:
String word, word1;
Scanner scan = new Scanner (System.in);
System.out.println ("Enter continuous lines of text: ");

while (scan.hasNextLine()){
word = scan.nextLine();
word1 = scan.nextLine();
}
if (word.equals(word1)){
System.out.print ("Repeated:" + word);
}
else if
(word.isEmpty()){
System.out.print("Farewell");

}
}
}
 

A:Solved: Java: If a line is exactly equal to the previous line

Hi, Welcome to TSG

OK, lets have a look at the ISSUES in your code

1. If you have JUST TWO WORDS, then no need of the loop
2. The way you checked for the blank line is wrong
3. If you want to check two strings, don't use .equals(). Because it will check the STRING OBJECT. For an example, if the both lines are blank, it will still print "Repeated"
4. You have to check whether any of the lines are blank or not, but you are checking only the first line

Have a look at the following edited code
Code:
import java.util.*;

public class Test
{
public static void main(String[] args)
{

String word=null;
String word1 = null;



Scanner scan = new Scanner (System.in);
System.out.println ("Enter continuous lines of text: ");


word = scan.nextLine();
word1 = scan.nextLine();

if (word==word1)
{
System.out.print ("Repeated:" + word);
}
else if((word==null || word.length()==0) || (word1==null || word1.length()==0))
{
System.out.print("Farewell");
}

}
}
 

Read other 2 answers
RELEVANCY SCORE 82.8

Hi,
I was printing some music and had to change my settings.
After cancelling the printer, I tried to print with new settings,
But the printer won't print because it says Off-line.
I've tried right clicking the printer icon to put it On-line,
But it continues to say off-line.
How can i get it back on-line and printing again?
chuck.
 

A:Solved: Printer Reads Off-line, Won't go on-line.

Turn the printer off, then back on. Restart the computer.
 

Read other 2 answers
RELEVANCY SCORE 82

I have a word document containing paragraphs, where >90% of the paragraphs contain the word "Unique". What i would like to do is use the .find method to identify the word "Unique", then, if there is one available, use a method that moves the selection of the range, from the beginning of the word "Unique", to the end of each paragraph. At that point, i want to "delete" my range. then go to the next paragraph, or next instance of where the word "Unique" is used. In excel, i typically cycle through each cell value until i get a hit, but I would like to use a range object such as .find in Word vba to locate the word in the paragraph, then use a method to expand the range to include all the words, or characters to the end of the paragraph. My request to use the Range/Method approach instead of cycling through every paragraph is to save time on documents that contain over 168 to 300 pages.
for example:​1. Accessing the System Rules
i. The system shall provide online system functionality. Unique ID: ID-55
Role(s): Member, Unit CO/Unit Des Rep, Designated Rep, Pay Clerk, Pay Supervisor, Attendance Clerk (Phase 1)
ii. The system shall require authorized users to log onto the system using authorized credentials to access system functionality. Unique ID: ID-56 Role(s): Member, Unit CO/Unit Des Rep, Designated Rep, Pay Clerk, Pay Supervisor, System Administrator, Attendance Clerk (Phase 1)
iii. The system shall require use... Read more

Read other answers
RELEVANCY SCORE 82

Hi im using ms office 2002... im doing a document in word and have put a header and footer on with date time etc.but i would like to put like a page line on which goes on after that.

I have done it before but forgot and i cant work out how to do it again

any idears??

Thanks ipatriot
 

A:Solved: ms word.. line in footer

Not sure I follow ; you want a new line in e.g. the header showing the page #?

With the cursor to the right of whatever's in the header, press Enter. Then click the "Insert Page Number" button on the H&F toolbar (should be the first icon, looks like a sheet of paper with "#" on).

HTH,
Andy
 

Read other 3 answers
RELEVANCY SCORE 82

I have a letter and I inserted a line between my address and the text of the letter. I think I may have added it with draw but am not sure. The document won't allow me to get rid of the line or delete it. What do I do?
 

A:Solved: Remove line in word

Got it, I had to select the arrow next to draw and it allowed me...guess I should experiment more before posting.
 

Read other 1 answers
RELEVANCY SCORE 82

I copy and past text from web pages into Word 2000 quite a bit. Much of the time, the lines within the paragraph have spacing between all the lines that ranges from an extra half-line to an extra full line of blank space between the lines.

How do I remove this extra line spacing? The same settings that usually do it for everything else, will not work for the text pasted from web pages.
 

A:Solved: How to set line spacing in Word?

Read other 6 answers
RELEVANCY SCORE 81.2

Recently I downloaded Windows 7 to my computer. I write a lot and have discovered that in Word it automatically double spaces between lines. I want there to be single spacing. How do I get that?
 

A:Solved: I want single line spacing in Word

What version of M$ Office due you have???
 

Read other 3 answers
RELEVANCY SCORE 81.2

Hi,

I am using Excel 2003 at office, are there any experts to teach me how to use Marco or VBA to automatically insert lines before and after designated word in each cell under the same column.

Example.
Under the column A, there are Cell A1 to A100, each cell has the same word of “Interval” but it exists in different description. (Whatever they show, I want to use “Interval” and “Interval:”as my keyword to make formula or Macro)

A1: (Original)
Change engine oil.Interval: 5000 KM.
A2: (Original)
Lubricate axle joint.Interval: 3000 Hours.


I want to: (note: * = line break)

-Insert 2 lines (line break) before “Interval” and
-Insert 1 line after “Interval:” and
-automatically search the last position of the content in A1 to A100, and insert 2 lines after it

A1:
=======================
Change engine oil.*
*
Interval:*
5000 KM.*
*
=======================
A2:
=======================
Lubricate axle joint.*
*
Interval:*
3000 Hours.*
*
=======================
Thank you very much for help,

Happy New Year !

Scott

In Canada
 

A:Solved: (Help)How to insert line before/after designated word.

Read other 7 answers
RELEVANCY SCORE 81.2

I have word 2007 and am using outline view to study for an exam. I need to know if it is possible to change the line length for a given heading? Basically I have a heading with text in it that drops onto another line, I need it to be all one line.

Thanks
 

A:Solved: Word 07 outline line length?

Hi techmaster,
If you go to File/Options/Advanced, you can scroll down to the "Show document content" category and check the box for "Show text wrapped in the document window". Does that do what you need?
 

Read other 3 answers
RELEVANCY SCORE 81.2

Using MS Word 2000, I create a line across the page by several dashes (----) followed by an Enter. I would like to delete a line that was put there by someone else. How do I do that?

Thanks.
 

A:Solved: word 2k: how to erase the line across the page

Read other 11 answers