Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 06-08-2015, 10:44 PM
macropod's Avatar
macropod macropod is offline VBA to save word user form value to xml Windows 7 64bit VBA to save word user form value to xml Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
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

You can create & update any custom document properties you might require with code like:
Code:
Dim StrClient As String, StrAddr As String
StrClient = "Client Name": StrAddr = "Client Address"
With ActiveDocument
  With .CustomDocumentProperties
    On Error Resume Next
    .Add Name:="Client Name", Type:=msoPropertyTypeString, LinkToContent:=False, Value:=StrClient
    .Item("Client Name").Value = StrClient
    .Add Name:="Client Address", Type:=msoPropertyTypeString, LinkToContent:=False, Value:=StrAddr
    .Item("Client Address").Value = StrAddr
  End With
End With
Simply replace "Client Name" and "Client Address" in the above code with references to the appropriate textboxes on your userform.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
User Form - Close Paragraphs SonyaEnz Word VBA 4 06-05-2015 06:16 AM
User form abdulgani Excel 0 12-15-2014 05:54 AM
how to save contents in textbox in VB2013 form into a Word document? saltlakebuffalo Word VBA 6 12-10-2014 06:12 PM
VBA to save word user form value to xml Force User to Save As lgillespie Word 6 09-09-2013 03:13 PM
VBA to save word user form value to xml User Form placasse47 Excel Programming 3 08-01-2012 05:57 AM

Other Forums: Access Forums

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