Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
Go Back  Xtreme Visual Basic Talk > > > Put strikethrough text between brackets in a Word Document


Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2013, 10:23 AM
pablormago pablormago is offline
Newcomer
 
Join Date: Apr 2013
Posts: 1
Default Put strikethrough text between brackets in a Word Document


Hi to all, i have a little problem, i need to find text formated in 'strikethrough ' and put in between brackets.


The following code can replace every character in strikethrough by an "*" but i need the found text to be between brackets "[]":


Code:
Dim newWord As Word.Application = Nothing 
Dim newDocs As Word.Documents = Nothing 
Dim newDoc As Word.Document = Nothing 
newWord = New Word.Application() 
newDocs = newWord.Documents 
newDoc = newDocs.Open("C:\Prueba.doc") newDoc.Range.Tables(1).Columns(2).Select() newWord.Selection.Find.ClearFormatting() newWord.Selection.Find.Font.StrikeThrough = True newWord.Selection.Find.Replacement.ClearFormatting() 
With newWord.Selection.Find 
.Text = "*" 
.Replacement.Text = "[" & .Text &"]" 
.Forward = True 
.Wrap = Word.WdFindWrap.wdFindContinue 
.Format = True 
.MatchWildcards = True 
End With newWord.Selection.Find.Execute(Replace:=Word.WdReplace.wdReplaceAll) newDoc.SaveAs("C:\Prueba.doc") 
newDoc.Close() 
newWord.Quit()
Can anybody help me please???

Thanks in advance...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
 
Put strikethrough text between brackets in a Word Document
Put strikethrough text between brackets in a Word Document
 
-->