Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-14-2023, 12:00 PM
Jamez Jamez is offline Automatically update Drop Caps? Windows 10 Automatically update Drop Caps? Office 2019
Novice
Automatically update Drop Caps?
 
Join Date: Jun 2023
Posts: 3
Jamez is on a distinguished road
Default

I've tried ChatGPT to get a macro to do this but I always get an error.

This is what ChatGPT came up with, but I receive Compile error: Method or data member not found


Sub ApplyDropCapOptions()
Dim rng As Range
Dim dropCap As DropCap

' Loop through each paragraph in the document
For Each rng In ActiveDocument.Paragraphs.Range
' Check if the paragraph has a drop cap
If rng.DropCap = True Then
' Select the drop cap
rng.Select

' Open the Drop Cap Options dialog box
Set dropCap = Selection.ParagraphFormat.DropCap
dropCap.Clear

' Click "OK" to apply default settings
dropCap.Enable = True
dropCap.Position = wdDropNormal
dropCap.LinesToDrop = 1

' Close the Drop Cap Options dialog box
dropCap.Clear
End If
Next rng
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to convert first word of each section to Drop Caps wrdy Word VBA 2 05-30-2023 01:20 PM
Powerpoint-2019 Text in selected theme remains in All Caps even when small caps option is selected Tanasha4 PowerPoint 2 04-06-2019 07:53 PM
Automatically update Drop Caps? Need a Macro to Change Every Instance of Small Caps to All Caps and Reduce the Font by 2 Points CrossReach Word VBA 2 11-13-2017 09:21 AM
Automatically update Drop Caps? Drop Caps Problem dustnik Word 5 12-12-2016 01:14 PM
Multiple drop caps Ziggy-R Publisher 0 10-26-2010 06:23 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft