![]() |
|
#1
|
|||
|
|||
|
Trying to insert text at beginning of all text files in folder.
part of relevant code below. if wrd = "start" no issues. but my text is long. 1. First problem is that after \n editor inserts " mark at end of first line. Why? 2. The other lines start with ' (such as 'Text1') so obviously, the lines are commented out. What is easy way to insert long text with ' marks? Dim oRng As Range Dim i As Long Set oRng = DocSrc.Range 'oRng set to entire document wrd = "030100 FILL, DECLARE, GLOBAL, DECIMAL, LIST, \n 'zzz-NUM', 'yyy-NUM' \n," _ 'Text1', 'Text2', 'Text3', _ 'Text4', 'DESC1', 'DESC2', 'DESC3', _ 'DESC4' oRng.InsertBefore wrd |
| Tags |
| comments, word vba |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Word VBA - Save file as a string contained within the word (always same row and leng)
|
RG87 | Word VBA | 1 | 05-21-2014 05:39 AM |
Way to search for a string in text file, pull out everything until another string?
|
omahadivision | Excel Programming | 12 | 11-23-2013 12:10 PM |
| problems with apostrophe | rbsalyer | Word | 2 | 09-01-2013 07:08 PM |
| apostrophe button spelling "apostrophe" | birdfloyd | Outlook | 0 | 10-12-2011 07:35 AM |
| Outlook 2007 apostrophe glitch | TPaul8705 | Outlook | 0 | 06-07-2011 08:23 AM |