Drop cap
-
- SilverLounger
- Posts: 1881
- Joined: 27 Jan 2010, 19:15
- Location: Darlington, Co. Durham. UK
Re: Drop cap
.................go for it bro. let me know if the sequence I mentioned above is easy to follow.....Dave up in the shivering morth east of UK.
-
- SilverLounger
- Posts: 1881
- Joined: 27 Jan 2010, 19:15
- Location: Darlington, Co. Durham. UK
Re: Drop cap
New hurdle :- When I positioned the cursor on the first line of an article [on the word Relationships in this case] then hit the assigned keyboard shortcut keys for a dropped cap I got this error message, but the code shown when I select the "Debug" tab means nothing to me. Why would this error occur and what changes if any need to be made to the [line of code in red?] I should have said that the first letter did not turn to a dropped cap. Puzzled again.
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 80042
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Drop cap
The macro will only work if the paragraph containing the selection has at least one character. You'll get the error message if the paragraph is empty.
If it's empty, there is nothing to drop...
If it's empty, there is nothing to drop...
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 1881
- Joined: 27 Jan 2010, 19:15
- Location: Darlington, Co. Durham. UK
Re: Drop cap
I appreciate that Hans but the cursor was positioned over the first word as at othefr times when it worked just fine. Thanks.
-
- Administrator
- Posts: 80042
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- SilverLounger
- Posts: 1881
- Joined: 27 Jan 2010, 19:15
- Location: Darlington, Co. Durham. UK
Re: Drop cap
as the Ausies would say; "No worries mate" it is after all not anything to sweat about being just a slight enhancement of the text, besides, it works most of the time. Regards Dave.
-
- SilverLounger
- Posts: 1881
- Joined: 27 Jan 2010, 19:15
- Location: Darlington, Co. Durham. UK
Re: Drop cap
Further to this last post, I have not used the macro I created for quite some time but now for some unknown reason when I do using the keyboard shortcut I assigned Ctrl+Shift+M, it fails showing the error message shown. How can this anomally be rectified please.



You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 80042
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Drop cap
Does it work better if you change the macro code to
Code: Select all
Sub MyDropCap()
With Selection.Paragraphs(1)
If Len(.Range.Text) > 1 Then
With .DropCap
.Position = wdDropNormal
.FontName = "Castellar"
.LinesToDrop = 2
.DistanceFromText = 3 ' in points
End With
End If
End With
End Sub
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 676
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: Drop cap
See also: Fix DropCaps https://answers.microsoft.com/en-us/mso ... 932757689b

Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- PlutoniumLounger
- Posts: 16789
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Drop cap
You are not alone. Back in 2012 I was hired by the CIBC bank in Toronto. I was hired to write VBA code and had been recommended by an earlier client of mine. After five weeks of stuttering activity the project leader terminated the contract because Senior Management had caught whiff of the project, and back when Senior Management were younger, they had lived through the tainted normal.dots of the early 1990s.LineLaline wrote: ↑24 Dec 2022, 16:22... In fact, back in the 'old days' when they were 'terribly dangerous' one of the first things I did after installing Office was turning off all macro functionality.
In their minds VBA was bad because that was programming in MSOffice.
I never did find out how the CIBC developed an interface between their documents and their data.
Please don't get too paranoid, or you'll end up like me

Cheers, Chris
Fill your face with laughter, then there will be no room for tears.
-
- SilverLounger
- Posts: 1881
- Joined: 27 Jan 2010, 19:15
- Location: Darlington, Co. Durham. UK
Re: Drop cap
This is the only template where an answer can be written though it does not appear at the end of your post Hans! I copied and pasted the code you supplied which works if I click on the Insert / Macros / Run tabs but not when using the keyboard shortcut keys I originally assigned! Might just create a new one. Thanks Dave.
-
- Administrator
- Posts: 80042
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- SilverLounger
- Posts: 1881
- Joined: 27 Jan 2010, 19:15
- Location: Darlington, Co. Durham. UK
Re: Drop cap
Thanks Hans, I've tried to make a new macro a couple of times -using the none expert way I showed earlier in the post- but for some reason it does not work. I tried pasting the code you provided also but no joy either. Kowing next to nothing about macros I simply pasted the code you gave but I suspect it represents only part of what's needed as it does not work. If so, is it possible for you to create and post the entire code with e.g. the shortcut keys being [alt gr + \]? Kind regards Dave.
-
- Administrator
- Posts: 80042
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- 5StarLounger
- Posts: 670
- Joined: 14 Nov 2012, 16:06
Re: Drop cap
Why not putting the dialog wdformatdropcap in the QAT ?
1 click to open the dialog, 1 clickt ro adapt 3 into 2, 1 click to close the dialog.
1 click to open the dialog, 1 clickt ro adapt 3 into 2, 1 click to close the dialog.
You do not have the required permissions to view the files attached to this post.
-
- 5StarLounger
- Posts: 676
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: Drop cap
Dave Davison wrote: ↑06 Feb 2025, 15:34Thanks Hans, I've tried to make a new macro a couple of times -using the none expert way I showed earlier in the post- but for some reason it does not work. I tried pasting the code you provided also but no joy either. Kowing next to nothing about macros I simply pasted the code you gave but I suspect it represents only part of what's needed as it does not work. If so, is it possible for you to create and post the entire code with e.g. the shortcut keys being [alt gr + \]? Kind regards Dave.

Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word