View Single Post
 
Old 02-14-2016, 05:26 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

FWIW, you could use a Word document such as the one you've already created for this. For example, if you add the following code to the document and save it in the doc or docm format, you could use the following code with your existing button:
Code:
Private Sub CommandButton1_Click()
Dim Rng As Range
Set Rng = Selection.Cells(1).Range
With Rng
  .End = .Paragraphs.Last.Range.Start - 1
  While .Characters.Last.Text = vbCr
    .End = .End - 1
  Wend
  ActiveDocument.Tables(2).Cell(2, 2).Range.Text = .Text
End With
End Sub
Simply add the code to the document's 'ThisDocument' VBA code module.

Do note that users will need to enable macros for the button to work.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote