Using a VBA Form to Update doc props

P

Phil

Hi Folks,
I'm trying to use a UserForm to:
a) display the current document propoerties (e.g., Title)
b) capture and update user entered properties

I'm able to update the document Title with the following code but I am
struggling to capture the existing Title and display it in the UsearForm.
I'm certinly making loads of mistakes - any guidance would be appreciated:
Public Sub UserForm1_activate()
Call UserForm_Initialize
End Sub

Public Sub UserForm1_Initialize()
With UserForm1
TitleData.Text = ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle)
'There's a problem here ?
End With


End Sub


Sub OK_Click()
Dim Title As String
With ActiveDocument

.BuiltInDocumentProperties("Title") = TitleData
End With

TitleData = ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle)


MsgBox TitleData
End Sub
<<<<<<<<<<<<<
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top