Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-07-2016, 02:10 AM
Tester1234 Tester1234 is offline Zahlen ausgeschrieben darstellen Windows 10 Zahlen ausgeschrieben darstellen Office 2016
Novice
Zahlen ausgeschrieben darstellen
 
Join Date: Jul 2016
Posts: 3
Tester1234 is on a distinguished road
Default Zahlen ausgeschrieben darstellen

Guten Tag ich möchte das Zahlen in Word ausgeschrieben dargestellt werden.
Also das 123 per Tasteklick Einhundertdreiundzwanzig wird. Das habe ich mit Folgendem Befehl auch schon ganz gut hinbekommen:

Sub Makro1()


'
' Makro1 Makro
'
'
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.TypeText Text:="="
Selection.MoveRight Unit:=wdCharacter, Count:=4
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="\*CARDTEXT"
Selection.Fields.Update
End Sub

Das Problem ist nun das wenn ich z.B 1 oder 1234567 eigebe das nicht funktioniert. Wenn ich den .MoveRight Count auf 3 stelle funktioniern 1 & 2stellige Zahlen wenn ich ihn auf 5 stelle 3&4stellige.

Ich möchte aber das alle erkannt werden.. :-/

Das Problem ist (soweit ich das verstanden habe) das der \*CARDTEXT Befehl auserhalb de Klammer eingefügt wird wenn die Zahl zu groß wird.
Was ich nicht verstehe ist wenn ich den Counter auf 5 stelle warum er dann nur 3&4stellige Zahlen erkennt...

Kann mir jemand erklären wie das funktioniert bzw. das Script einfügen? :-)
Danke!
Reply With Quote
 

Tags
count logic, german, problem



Other Forums: Access Forums

All times are GMT -7. The time now is 05:09 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