Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-21-2020, 02:05 PM
savvy savvy is offline saving with wrong name Windows 10 saving with wrong name Office 2016
Novice
saving with wrong name
 
Join Date: Aug 2020
Location: Toronto
Posts: 23
savvy is on a distinguished road
Default saving with wrong name

I want to save file as:



firstname.lastname.docx
in folder c:\users\savvy\documents\final doc\
firstname and lastname are bookmarks from userform

but am getting

runtime error 5152
this is not a valid filename

code:
strPath = Environ("USERPROFILE") & "\Documents\final doc"
ActiveDocument.SaveAs strPath & TextBox2.Text & "." & TextBox1.Text & ".docx"

any advice appreciated
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Email macro saving the wrong document andywal6 Mail Merge 1 08-13-2019 09:00 PM
Am I using the wrong formula? Father Excel 2 05-24-2017 12:27 PM
Outlook 2010: Saving attachments opens up wrong windows folder to save in jeroen Outlook 0 09-29-2015 01:51 AM
saving with wrong name Word 2010 - Saving Wrong Version WordMaus Word 2 12-24-2013 08:27 AM
saving with wrong name PLEASE HELP-wrong formatting???? bruce Word 10 04-10-2010 03:45 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:40 AM.


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