Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-16-2014, 02:24 AM
tintin007 tintin007 is offline compile error in save code Windows XP compile error in save code Office 2007
Novice
compile error in save code
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
compile error in save code FileSystemObject Compile Error: User-Defined Type Not Defined gsrikanth Excel Programming 2 03-28-2022 06:32 AM
compile error in save code VBA code to compile one document based on multiple search terms Hoxton118 Word VBA 4 04-04-2021 06:02 AM
Compile error: sub or function not defined.. xena2305 Excel Programming 0 08-02-2011 10:17 AM
compile error in Word raco Word 0 09-28-2010 12:40 PM
Runtime error 5487 - Word cannot complete the save to to file permission error franferns Word 0 11-25-2009 05:35 AM

Other Forums: Access Forums

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