![]() Len(ActiveDocument.Tables(1).Cell(1, 2).Range.Text) - 2) txtCellDemo2.Text = Left(ActiveDocument.Tables(1).Cell(1, 2).Range.Text, _ Len(ActiveDocument.Tables(1).Cell(1, 1).Range.Text) - 2) txtCellDemo1.Text = Left(ActiveDocument.Tables(1).Cell(1, 1).Range.Text, _ txtBkmDemo2.Text = GetBMRangeValue("bkmDemo2") ![]() txtBkmDemo1.Text = GetBMRangeValue("bkmDemo1") 'Call Function to get the bookmarked data. txtVarDemo2.Text = ActiveDocument.Variables("varDemo2").Value txtVarDemo1.Text = ActiveDocument.Variables("varDemo1").Value This can be accomplished using the UserForm_Initialize event as follows: When a user needs to display the userform again in the current document to update or modify data, he or she will most likely want the existing data in the document to be visible in the form. 'Call (full code is available in the template) 'update fields to show current docvariable values SelectContentControlsByTitle("ccDemo2").Item(1).Range.Text = SelectContentControlsByTitle("ccDemo1").Item(1).Range.Text = 'Call procedure to set the bookmark range values If oDoc.ProtectionType wdNoProtection Then ActiveDocument.Unprotect Sub PopulateDocument(ByRef oUF As UserForm)
0 Comments
Leave a Reply. |