Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-22-2021, 01:40 AM
StingerMKO StingerMKO is offline CustomDocumentProperties not shown in header / footer / textfield Windows 10 CustomDocumentProperties not shown in header / footer / textfield Office 2019
Novice
CustomDocumentProperties not shown in header / footer / textfield
 
Join Date: Apr 2021
Posts: 2
StingerMKO is on a distinguished road
Default CustomDocumentProperties not shown in header / footer / textfield

Hello,

I added some CustomDocumentProperties to my document which should be filled with a VBA form

When I open the form, fill out the fields and want to populate the entries to the custom fields in my document, only the ones which are in the text itself are added.
The fields which I added in header/footer or in textfields in the document are not filled.


This ist the code of the button click in the VBA Form:

Code:
Private Sub inpDocGenerate_Click()
 
 
 
 
    ' Update the properties values
    ActiveDocument.CustomDocumentProperties("customDocType").Value = Me.inpDocType.Value
    ActiveDocument.CustomDocumentProperties("customClientName").Value = Me.inpClientName.Value
    ActiveDocument.CustomDocumentProperties("customDocTitle").Value = Me.inpDocTitle.Value
    ActiveDocument.CustomDocumentProperties("customOfferNum").Value = Me.inpOfferNum.Value
    ActiveDocument.CustomDocumentProperties("customDate").Value = Me.inpDate.Value
    ActiveDocument.CustomDocumentProperties("customCity").Value = Me.inpCity.Value
    ActiveDocument.CustomDocumentProperties("customAspName").Value = Me.inpAspName.Value
     
 
 
    ' Show changes of document properties in document
    ActiveDocument.Fields.Update
 
    ' Hide the userform
    UserForm1.Hide
 
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding text to the header and footer without removing all other content in the header and footer digitalelise Word VBA 2 10-23-2019 02:58 AM
Get CustomDocumentProperties vince692 Word VBA 8 05-13-2016 12:34 AM
Header and footer aligned in the footer area ashiqghfr Word 2 07-23-2015 01:14 AM
CustomDocumentProperties not shown in header / footer / textfield Document Variables vs CustomDocumentProperties Cosmo Word VBA 2 08-11-2014 01:35 PM
Set focus on a textfield on a repeating table happydigit Misc 0 11-24-2005 04:12 AM

Other Forums: Access Forums

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