![]() |
#1
|
|||
|
|||
![]()
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 |
|
![]() |
||||
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 |
![]() |
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 |