View Single Post
 
Old 11-16-2014, 02:24 AM
tintin007 tintin007 is offline Windows XP Office 2007
Novice
 
Join Date: Nov 2014
Posts: 4
tintin007 is on a distinguished road
Default compile error in save code

Hi Forum,

New on here so please help if you can. Have the following code to save file using text boxes in the document called tbpanelname and tbpanelnumber and possibly the date. code does not work, this version has compile error. no surprises there as i don't really use vba much. any thoughts of approaches to do this ??

cheers mark

Private Sub CommandButton1_Click()

Code:
With ActiveDocument
  .SaveAs2.FileName = "C:\mydocuments"
    .SelectContentControlsByTitle.SaveAs = ("TBpanelnumber" & "tbpanelname")
End With
End Sub
Reply With Quote