K
Kathy
I am looking for assistance to create a macro to reformat
letters from a semi-blocked style to a blocked style. I
am having difficulty in clearing/deleting tabs in
existing documents.
Here is what I have so far. I have had some success with
VBA in Excel, but Word is new to me.
Documents(1).Activate
ActiveDocument.Paragraphs(1).Outdent
ActiveDocument.Paragraphs(1).TabStops(1).Clear
Set myrange = Selection.Range
myrange.WholeStory
myrange.Font.Name = "Arial"
myrange.Font.Size = 12
myrange.ParagraphFormat.Alignment =
wdAlignParagraphCenter
myrange.ParagraphFormat.Alignment =
wdAlignParagraphLeft
myrange.ParagraphFormat.Alignment =
wdAlignParagraphJustify
End Sub
I am a bit puzzled, because if I choose to select all
text and center it, then left align it with the macro
recorder on, I get a document where everything is left
aligned. However if I run the resultant code on a
document, the tabs remain ?
TIA
letters from a semi-blocked style to a blocked style. I
am having difficulty in clearing/deleting tabs in
existing documents.
Here is what I have so far. I have had some success with
VBA in Excel, but Word is new to me.
Documents(1).Activate
ActiveDocument.Paragraphs(1).Outdent
ActiveDocument.Paragraphs(1).TabStops(1).Clear
Set myrange = Selection.Range
myrange.WholeStory
myrange.Font.Name = "Arial"
myrange.Font.Size = 12
myrange.ParagraphFormat.Alignment =
wdAlignParagraphCenter
myrange.ParagraphFormat.Alignment =
wdAlignParagraphLeft
myrange.ParagraphFormat.Alignment =
wdAlignParagraphJustify
End Sub
I am a bit puzzled, because if I choose to select all
text and center it, then left align it with the macro
recorder on, I get a document where everything is left
aligned. However if I run the resultant code on a
document, the tabs remain ?
TIA