Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2014, 06:53 AM
jpb103's Avatar
jpb103 jpb103 is offline Copy paste from RTF into cell causes extra lines to be created Windows 7 64bit Copy paste from RTF into cell causes extra lines to be created Office 2007
Advanced Beginner
Copy paste from RTF into cell causes extra lines to be created
 
Join Date: May 2014
Location: Thunder Bay, Ontario
Posts: 58
jpb103 is on a distinguished road
Default Copy paste from RTF into cell causes extra lines to be created

Hey guys,



I've got a macro that copies the contents of an rtf file (one or more bullet points) into a cell in a table in word. A new row for the data is created each time. My problem is that, the first row of the table puts an extra line in, and every subsequent row puts an extra line and a bullet point. I've tried find/replace without much success, but since for some reason the first row is not like the others I'm not sure this approach will work properly.
I've tried multiple combinations for the .Text of the .Find method, here is an example:
Code:
Selection.Find.Text = vbCrLf & Chr(149) & ""
This example removes all CrLf and bullets in the row. (not the droids I'm looking for).
Any help would be appreciated.
Reply With Quote
  #2  
Old 06-24-2014, 08:27 AM
jpb103's Avatar
jpb103 jpb103 is offline Copy paste from RTF into cell causes extra lines to be created Windows 7 64bit Copy paste from RTF into cell causes extra lines to be created Office 2007
Advanced Beginner
Copy paste from RTF into cell causes extra lines to be created
 
Join Date: May 2014
Location: Thunder Bay, Ontario
Posts: 58
jpb103 is on a distinguished road
Default

Kind of found a solution so I'm marking this thread solved. Apparently they decided that having multiple lines is enough and they don't particularly need bullets. So I scrapped the code to save, copy, paste and delete the .rtf file and just grabbed the text from my RTF text box and put it in the cell. Easy peasy.
Reply With Quote
Reply

Tags
copy/paste, find/replace, rtf



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra lines in directroy when field is blank redzan Mail Merge 5 05-23-2014 06:40 PM
Copy paste from RTF into cell causes extra lines to be created Copy Paste each cell to a new page Singh_Edm Word 12 01-20-2014 12:55 AM
Autofit adding extra lines John_G Excel 0 11-20-2012 08:19 AM
Copy paste from RTF into cell causes extra lines to be created Extra spaces between the lines after pasting data to Word ramsgarla Word VBA 1 10-29-2012 12:26 AM
Copy paste from RTF into cell causes extra lines to be created Slight extra space between lines. lucadelcarlo Word 1 04-23-2011 04:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:37 AM.


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