Datefield in Word to Text in AutoOpen Macro before updating field

%3CLINGO-SUB%20id%3D%22lingo-sub-1532491%22%20slang%3D%22de-DE%22%3EDatefield%20in%20Word%20to%20Text%20in%20AutoOpen%20Macro%20before%20updating%20field%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1532491%22%20slang%3D%22de-DE%22%3E%3CP%3EHello%20%3CBR%20%2F%3E%3CBR%20%2F%3E%20I'm%20searching%20for%20a%20solution%20to%20convert%20the%20datefield%20in%20Word%20by%20the%20AutoOpen%20Macro%20before%20the%20field%20updates.%20I've%20the%20macro%20to%20unlink%20the%20fields%2C%20but%20it%20will%20updates%20the%20dates%20before%20the%20unlink%20happens.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMacro%20command%3A%20%3CEM%3EActiveDocument.Fields.Unlink%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20have%20a%20solution%20for%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1532491%22%20slang%3D%22de-DE%22%3E%3CLINGO-LABEL%3E2016%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20Apps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWord%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1535089%22%20slang%3D%22en-US%22%3ERe%3A%20Datefield%20in%20Word%20to%20Text%20in%20AutoOpen%20Macro%20before%20updating%20field%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1535089%22%20slang%3D%22en-US%22%3EA%20DATE%20field%20will%20always%20show%20the%20current%20date%20(following%20an%20update).%20If%20you%20want%20the%20creation%20date%20of%20the%20document%2C%20use%20a%20CREATEDATE%20field%20instead.%20No%20unlinking%20would%20be%20required.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20are%20trying%20to%20do%20something%20entirely%20different%2C%20please%20elaborate.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1535168%22%20slang%3D%22de-DE%22%3ERe%3A%20Datefield%20in%20Word%20to%20Text%20in%20AutoOpen%20Macro%20before%20updating%20field%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1535168%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F501319%22%20target%3D%22_blank%22%3E%40Stefan_Blom%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20answer.%20But%20I%20need%20to%20convert%20over%201000%20automatically%20documents.%20I%20can't%20edit%20these%20documents.%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20need%20a%20solution%20to%20put%20a%20macro%20in%20the%20Normal.dotm%20file.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello

I'm searching for a solution to convert the datefield in Word by the AutoOpen Macro before the field updates. I've the macro to unlink the fields, but it will updates the dates before the unlink happens.

 

Macro command: ActiveDocument.Fields.Unlink

 

Does anyone have a solution for this?

3 Replies
A DATE field will always show the current date (following an update). If you want the creation date of the document, use a CREATEDATE field instead. No unlinking would be required.

If you are trying to do something entirely different, please elaborate.

@Stefan_Blom 

Thanks for the answer. But I need to convert over 1000 documents automatically. I can't edit these documents. 

So I need a solution to put a macro in the Normal.dotm file.  

@rhubergbl 

 

That certainly is different. 

 

Since the DATE field updates when a document opens, simply unlinking the field isn't going to help, as you have noticed. You could have the AutoOpen macro replace DATE fields with CREATEDATE fields, but that would require more complex coding of course.