Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-28-2017, 02:56 AM
christoph christoph is offline Word VBA 2003 zu 2013 konvertieren Windows 8 Word VBA 2003 zu 2013 konvertieren Office 2013
Novice
Word VBA 2003 zu 2013 konvertieren
 
Join Date: Mar 2017
Posts: 1
christoph is on a distinguished road
Default Word VBA 2003 zu 2013 konvertieren

Moin Ihr,

wir haben eine alte .dot Vorlage für Word 2003 und müssen in dieser jetzt das VBA Script für Word 2013 anpassen. Leider ist hier niemand der wirklich nen Plan davon hat.

Ich hoffe dass ihr mir vielleicht weiterhelfen könnt.

In dem Formular sind einige Felder, die ausgeblendet werden sollen, wenn sie nicht gefüllt sind.

Aktuell lösen wir es in 2003 so:

Code:
Dim aufvm
aufvm = ActiveDocument.FormFields("AUFVMABETRAG").Result
If aufvm <> "" And Not aufvm = "0,00" Then
ActiveDocument.FormFields("AUFVMABETRAGT").Result = "hier kommt Text rein"
wert = 1
Else
ActiveDocument.FormFields("AUFVMABETRAG").Delete
ActiveDocument.FormFields("AUFVMABETRAGT").Delete
End If

Vielen Dank


Christoph
Reply With Quote
  #2  
Old 03-28-2017, 09:27 AM
Souriane Souriane is offline Word VBA 2003 zu 2013 konvertieren Windows 7 64bit Word VBA 2003 zu 2013 konvertieren Office 2013
Advanced Beginner
 
Join Date: Feb 2017
Location: Quebec, Canada
Posts: 82
Souriane is on a distinguished road
Default

Hi!

I tried it on my Word 2013 and it work just fine. What error do you get?

Are your two fields "AUFVMABETRAG" and "AUFVMABETRAGT" present in your document? Maybe their name have changed?

Bye!

Souriane
Reply With Quote
  #3  
Old 03-28-2017, 04:59 PM
macropod's Avatar
macropod macropod is offline Word VBA 2003 zu 2013 konvertieren Windows 7 64bit Word VBA 2003 zu 2013 konvertieren Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Christoph: Dein Code versteckt nicht einfach die Formfelder, sondern versucht sie zu löschen. Das wird nicht funktionieren, während das Dokument Schutz für Formulare hat (auch in Word 2003), aber nichts in Ihrem Code zeigt an, dass Sie die Schutzeinstellungen ändern. Du könntest das Verlangen vermeiden, indem du '.Delete' auf '.Result =' ''

Beachten Sie auch, dass Ihre neue Vorlage im .dotm-Format gespeichert werden muss, nicht .dotx

Souriane : Christoph's post doesn't mention an 'error', so that doesn't seem relevant in this case.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Office File Converter (OFC.exe) - good for Word 2003 to Word 2013 conversion? RichardDavey Word 4 05-28-2015 05:36 PM
Is there an equivalent of Word 2003's autotext in Word 2013? tawlloyd Word 2 12-12-2014 08:27 AM
Word VBA 2003 zu 2013 konvertieren Word 2003 comments not appearing in Word 2013? DensityDuck Word 1 06-05-2014 09:47 PM
Word 2013 file opens as WD00000x and in 97 - 2003 format duncanwil Word 0 07-23-2013 10:51 PM
Are user customizations transferable from Word 2003 to Word 2010 (2013)? New Daddy Word 3 01-14-2013 07:25 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:37 AM.


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