![]() |
|
#1
|
|||
|
|||
|
I am calling a embedded word document from excel and populating it with tables from excel with financial data to produce a report.
When the tables are copied into word the numbers contain leading spaces that are spoiling the formatting. I have written the code to strip out the leading spaces however the data is still left justified rather than right justified. I am trying to use the following code using wildcards to locate any financial numbers and left justify them however I am off the mark as the code 1) removes the financial numbers and 2) does not justify. With wrdObj .Content.SelectAll With .Selection.Find .ClearFormatting .Replacement.ClearFormatting .Text = "*.[0-9][0-9]" .MatchWildcards = True .Wrap = wdFindContinue .Execute Replace:=wdReplaceAll If .Found = True Then .Parent.Font.Alignment = wdAlignParagraphRight End With End with Any help appreciated. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to either move document display to right or left; or reduce size of find/replace window.
|
pmstock | Word | 2 | 08-02-2014 08:34 PM |
Find and Replace function shooting off screen to the left of the document
|
Mattblack | Word | 1 | 04-10-2014 03:06 PM |
Align...both left and right?
|
supersimu | Word | 1 | 01-25-2014 02:05 AM |
Numbers on the left side of the text
|
Felipe | Word | 2 | 04-19-2012 07:35 AM |
How to align page to left side instead of centre
|
ghumdinger | Word | 2 | 08-18-2011 10:15 AM |