![]() |
#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. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
pmstock | Word | 2 | 08-02-2014 08:34 PM |
![]() |
Mattblack | Word | 1 | 04-10-2014 03:06 PM |
![]() |
supersimu | Word | 1 | 01-25-2014 02:05 AM |
![]() |
Felipe | Word | 2 | 04-19-2012 07:35 AM |
![]() |
ghumdinger | Word | 2 | 08-18-2011 10:15 AM |