|
-
Oct 2nd, 2004, 06:04 AM
#1
-
Oct 3rd, 2004, 01:18 PM
#2
New Member
Hi,
For this I usually just go via menu to
Find and Replace
Find What: ^p^p
Replace with: ^p
Replace All (Maybe run this more than once...)
This might vary if you mean Manual Line Break instead of Paragraph mark. Go to in Find and Replace to More > Special for list of all possible symbols).
Hope I got your piont and this can help you!
jl88
-
Oct 4th, 2004, 01:47 AM
#3
Thanks for the help. I was looking into this menu very deep, but it doesn't work for the document I'm working on( tested all formating possiblities)
The problem is I have a file that needs to be imported to word, and while importing it gets empty lines between all text lines (something like 2 ^p's, but it's not that). Maybe I have the run thru the file and look for the occasion of double char's and so on.
I#m still onto that, but in here I've got time...
PS
This morning (6 o'clock) running in nice 30 degree C and 65% humidity.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Oct 5th, 2004, 05:11 PM
#4
You can apply this procedure after you import your textfile. It can
either remove all multiple line spacing or remove multiple line
spacing from a selected range.
VB Code:
Public Sub RemoveMultipleEnters()
'Apply to first paragraph
ActiveDocument.Paragraphs(1).LineSpacingRule = wdLineSpaceSingle ' Const = 0
'Or can be applied to a selected paragraph(s)
Selection.ParagraphFormat.LineSpacingRule = wdLineSpaceSingle ' Const = 0
End Sub
VB/Outlook Guru!
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 5th, 2004, 11:53 PM
#5
Thjanks RobDog but it's not the linespacing.
I'll attach a zipped example file.
The thing is, if I create such an example in word, search&replace will do it by deleting (^p^p) with (^p), but it doesn't do it for this special one. We get these files from a specific source, so we have to deal with it.
Last edited by opus; Jul 18th, 2007 at 02:51 AM.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Oct 6th, 2004, 12:31 AM
#6
Ok, got the document. I see what you mean. I will work on it
tomorrow. Time for bed.
Later.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 6th, 2004, 12:48 AM
#7
Have a nice rest, we're just starting the day.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Oct 6th, 2004, 11:46 AM
#8
Ok, GOT IT!
VB Code:
Public Sub RemoveMultipleEnters()
'Select the documents contents
Application.Documents("Example.doc").Select
'Apply to the selection
Do While InStr(1, Selection, Chr(13) & Chr(13)) > 0
Selection.Characters(InStr(1, Selection, Chr(13) & Chr(13))).Delete
Loop
End Sub
This will delete the double Enter characters. If its not exatly
what you need I know that it will only take minimal mods to make
it leave the document as you want (single chr(13)'s or none at all
or ???). Getting the mechanics was the hard part.
HTH
VB/Outlook Guru!
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 6th, 2004, 10:40 PM
#9
Tausend Dank(in english: Many thanks), I couldn't find which Char that thing was, whow did you do it?
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Oct 6th, 2004, 11:41 PM
#10
No prob. 
An Enter Key is a Carriage Return or Chr(13) from the old DOS
days. In Word it displays the Paragraph symbol to represent an
Enter character (if you have that option turned on). Not too much
to it oher than finding and replacing.
Glad to help.
VB/Outlook Guru!
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|