Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-10-2014, 07:51 PM
saltlakebuffalo saltlakebuffalo is offline Windows 7 64bit Office 2010 32bit
Novice
don't know how to use ".wholestory" method
 
Join Date: Feb 2014
Posts: 11
saltlakebuffalo is on a distinguished road
Default don't know how to use ".wholestory" method

Hello, I am in Excel VBA UserForm. I have a long string text containing lots of chr(10) and chr (13) and I need to sent this string to a Word file. However after I sent I found lots of blank lines in the Word document and I had to manually "select all" and do "reduce the space between rows". Later I added a code to select the whole text in Word, but I don't know how to use "WholeStory" method to delete all these blank rows in the selected text. My code is as below (in Excel VBA):

Private Sub ScopeSendToWord
Dim objWordFile As Word.Application
Set objWordFile = New Word.Application
objWordFile.Documents.Add


objWordFile.ActiveDocument.Range.Text = txtScope (txtScope is a string text which I want to export to a Word file, the code works and I can see the content in Word file)
objWordFile.ActiveDocument.Range.Select (selecting text in Word file)
Selection.WholeStory (this is the code I added but I can't get through and I need help here)
objWordFile.Visible=True
End Sub

Thank you so much.
Jason
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: "Changes made were lost...reconnect with server", when switching "from" field randhurrle Outlook 2 02-25-2015 06:51 PM
When composing an e-mail how do I add "Page Layout" and "View" tabs to the ribbon CensorTilSin Outlook 1 12-11-2013 12:05 PM
help with compatibility of "WdSaveFormat" property of SaveAs method ajetrumpet Word 0 07-15-2013 07:29 AM
Method to active "Select Drawing Objects" rgustin Word VBA 1 08-18-2012 11:58 AM
don't know how to use ".wholestory" method How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft