[mso] Re: Macro for Dropped Cap in Word 2002?
- From: Genevieve <gene182000@xxxxxxxxx>
- To: mso@xxxxxxxxxxxxx
- Date: Mon, 28 May 2007 05:01:21 -0700 (PDT)
Hello Ray,
I believe your main problem is you are "supposing" that the cursor is at
beginning of paragraph when you run your macro.
Well, if it is not the case, you may run into problems (You will have a dropcap
in the middle of a par. which is not what you want I suppose). So first, I
would advise you to make sure the cursor is at the right position and then
apply the dropcap and the format.
the following worked for me:
sub DropCap()
Selection.Paragraphs(1).Range.Characters(1).Select
With Selection.Paragraphs(1).DropCap
.Position = wdDropNormal
.LinesToDrop = 3
.DistanceFromText = CentimetersToPoints(0)
End With
With Selection.Font
.Name = "Arial"
.Size = 52
.Shadow = True
End With
end sub
As you may see, I also deleted all the unecessary lines that you get when you
record a macro.
Hope this will help you.
Genevieve
----- Original Message ----
From: Ray Shapp <ras45@xxxxxxxxxxxxx>
To: mso@xxxxxxxxxxxxx
Sent: Monday, May 28, 2007 1:22:35 PM
Subject: [mso] Macro for Dropped Cap in Word 2002?
To All,
How to combine two macros into one?
In Word 2002, I created two separate macros that specify exactly the effect I
want. When I combine the two macros into one, I get several extra blank lines
in my document. The combined macro is included below my signature.
In use, I highlight the first letter of a paragraph then run this macro. It
forms a dropped capital using that initial letter, then it formats the letter
to appear in a shade of gray with a shadow effect. I'd like it to do only
that, however, the macro also adds several blank lines above the paragraph.
Please tell me how to modify two macros to avoid the extra lines.
Thank you,
Ray Shapp
***macro follows***
Sub DropCap()
'
' DropCap Macro
' Macro recorded May 28, 2007 by Ray Shapp
'
With Selection.Paragraphs(1).DropCap
.Position = wdDropNormal
.FontName = "Arial"
.LinesToDrop = 3
.DistanceFromText = InchesToPoints(0.08)
End With
'
' Format DropCap Macro
' Macro recorded May 28, 2007 by Ray Shapp
'
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With Selection.Font
.Name = "Arial"
.Size = 52
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = True
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorGray50
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = -5.5
.Kerning = 0
.Animation = wdAnimationNone
End With
End Sub
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the dropdown
menu at the top. This will allow you to unsubscribe your email address or
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to share files with the group, you must join our Yahoo sister group.
This group will not allow for posting of emails, but will allow you to join
and share problem files, templates, etc.:
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE
SHARING ONLY.
If you are using Outlook and you see a lot of unnecessary code in your email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
____________________________________________________________________________________Ready
for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.com/
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the dropdown
menu at the top. This will allow you to unsubscribe your email address or
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to share files with the group, you must join our Yahoo sister group.
This group will not allow for posting of emails, but will allow you to join
and share problem files, templates, etc.:
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE
SHARING ONLY.
If you are using Outlook and you see a lot of unnecessary code in your email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
- Follow-Ups:
- [mso] Re: Macro for Dropped Cap in Word 2002?
- From: Ray Shapp
Other related posts:
- » [mso] Macro for Dropped Cap in Word 2002?
- » [mso] Re: Macro for Dropped Cap in Word 2002?
- » [mso] Re: Macro for Dropped Cap in Word 2002?
- » [mso] Re: Macro for Dropped Cap in Word 2002?
- » [mso] Re: Macro for Dropped Cap in Word 2002?
- » [mso] Re: Macro for Dropped Cap in Word 2002?
- » [mso] Re: Macro for Dropped Cap in Word 2002?
- » [mso] Re: Macro for Dropped Cap in Word 2002?
- » [mso] Re: Macro for Dropped Cap in Word 2002?
- [mso] Re: Macro for Dropped Cap in Word 2002?
- From: Ray Shapp