Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-23-2017, 09:32 AM
sentinel166 sentinel166 is offline [W10, office 2013] couleurs s'inscrivent pas dans les macros quand je les enregistre Windows 10 [W10, office 2013] couleurs s'inscrivent pas dans les macros quand je les enregistre Office 2013
Novice
[W10, office 2013] couleurs s'inscrivent pas dans les macros quand je les enregistre
 
Join Date: Aug 2017
Posts: 4
sentinel166 is on a distinguished road
Unhappy [W10, office 2013] couleurs s'inscrivent pas dans les macros quand je les enregistre


Soit une ligne contenant, sans formattage aucun, ""
Je met en route l'enregistreur de macro, pour obtenir ça: f a c ffa
le 2e f se voit appliqué la modification "Gradient Fill, Gold, Accent 4, Outline - Accent 4", le troisième f est barré, et le dernier a est en indice.
Ni l'application de couleurs, ni celle d'effets de texte/typographie un peu flashy ne sont pris en compte par l'enregistreur de macro.

Code:
Sub Macro5()
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.Font.Bold = wdToggle
   Selection.MoveRight Unit:=wdCharacter, Count:=2
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   If Selection.Font.Underline = wdUnderlineNone Then
       Selection.Font.Underline = wdUnderlineSingle
   Else
     Selection.Font.Underline = wdUnderlineNone
   End If
   Selection.MoveRight Unit:=wdCharacter, Count:=2
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.MoveRight Unit:=wdCharacter, Count:=2
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.MoveRight Unit:=wdCharacter, Count:=1
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.Font.StrikeThrough = wdToggle
   Selection.MoveRight Unit:=wdCharacter, Count:=1
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.Font.Subscript = wdToggle
   Selection.MoveLeft Unit:=wdWord, Count:=4
End Sub
Reply With Quote
 

Tags
macro font color

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Macros in Microsoft Word 2013 Jacqui.Spinks Word VBA 0 03-02-2017 07:43 AM
[W10, office 2013] couleurs s'inscrivent pas dans les macros quand je les enregistre When I create a new macro in Word 2013, it overwrites my previously saved macros. lilihildreth Word VBA 3 02-05-2015 03:27 PM
[W10, office 2013] couleurs s'inscrivent pas dans les macros quand je les enregistre Edit button grayed out in macros dialog box (word 2013) diesel94 Word VBA 2 07-18-2014 04:13 PM
[W10, office 2013] couleurs s'inscrivent pas dans les macros quand je les enregistre Word 2013 problems with the Macros boki_s78 Word VBA 3 04-23-2014 03:30 AM
[W10, office 2013] couleurs s'inscrivent pas dans les macros quand je les enregistre Macros on Office 2011 for Mac kemsonj Word 6 10-25-2012 11:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:53 PM.


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