[mso] Re: Macro for Dropped Cap in Word 2002?

  • From: Ray Shapp <ras45@xxxxxxxxxxxxx>
  • To: mso@xxxxxxxxxxxxx
  • Date: Tue, 29 May 2007 23:57:01 -0400

Hi Genevieve,

Your macro is working exactly as desired now. I can't explain why it was 
applying the drop repeatedly to the first modified paragraph. Here it is again 
(below) unchanged from when it was failing.

In use, I place the cursor anywhere within a paragraph, then press Alt+F8 and 
run the macro. I then place the cursor anywhere within some other paragraph 
and press Alt+F8 and run the macro again. The result is that the initial 
letter of the two paragraphs are dropped and formatted as desired.

I can repeat the problem I reported earlier if I erroneously treat the same 
paragraph, but I'm certain I wasn't committing that error.

Bottom line:  All is well, and I'm very grateful!

Ray Shapp

Sub DropCap()
'
' DropCap Macro
' Macro recorded May 28, 2007 by Ray Shapp
' Extensively modified by Genevieve from MSO@xxxxxxxxxxxxx
'
    Selection.Paragraphs(1).Range.Characters(1).Select
    With Selection.Paragraphs(1).DropCap
        .Position = wdDropNormal
        .LinesToDrop = 3
        .DistanceFromText = InchesToPoints(0.08)
    End With
    With Selection.Font
        .Name = "Arial"
        .Size = 52
        .Color = wdColorGray50
        .Shadow = True
    End With
End Sub


----- Original Message ----- 
From: "Genevieve" <gene182000@xxxxxxxxx>
To: <mso@xxxxxxxxxxxxx>
Sent: Tuesday, May 29, 2007 1:11 PM
Subject: [mso] Re: Macro for Dropped Cap in Word 2002?


> Hello Ray,
> Sorry for not replying earlier. I did not have a chance to check the mail 
> until now. I am pleased the code helped you at least partly.
> Again, I am quite sure it is a matter of where the cursor (the selection) 
> is.
> How do you call your macro at all? where is the selection when you do call 
> the macro. did you change the code and write for example
> Selection.Paragraphs(1).Range.Characters(2).Select
> Well, I absolutely do not understand how the second letter of the first 
> paragraph would be "targeted" with the proposed code.
> If I understand the code correctly, the first part of it invokes the DropCap 
> of the first paragraph. I believe the DropCap can only be the first 
> character of the paragraph.
> the second part formats the selection to be Arial and size 52. That is where 
> the position of the cursor is very important. because if you did not make 
> sure to select the first letter of the paragraph, the format will be applyed 
> to another character and you may have two "big letters" that will look like 
> DropCaps.
> What don't you play with the code in order to be sure that you understand 
> every part of it.
> I would for example first use only the part of the dropCap and apply it to 
> different paragraphs and see how it works. and then only would I use the 
> second part of the formating.
>
> Hope this will help
> Genevieve
>

*************************************************************
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).
//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
*************************************************************

Other related posts: