Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / June 2006



Tip: Looking for answers? Try searching our database.

Using VB in word to save a file with a dynamic name based on user entry

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JMuzychka@gmail.com - 27 Jun 2006 19:55 GMT
Hi guys!

I'm trying to use VB in word to automatically save and send a form via
email.  I've figured out the email part and some of the save part but
I'm curious how I could make the file save with a dynamic name based on
data entry by the user. For example, when someone enters there name
into the first textfield of the form, when saving the form before
sending it, I'd like it to save as "form
_(textfield1user_entered_name).doc", basically "form_ jon.doc

Any idea how I can do this?
JMuzychka@gmail.com - 27 Jun 2006 19:57 GMT
JMuzyc...@gmail.com wrote:
> Hi guys!
>
[quoted text clipped - 7 lines]
>
> Any idea how I can do this?

On top of this.. Here is the code I have to save the document
automatically.. I need to make this save dynamically.. ALSO How could I
make the saved destination path be dynamic based on the username

Dim OrName As String

OrName = ActiveDocument.FullName
   ActiveDocument.SaveAs "C:\Documents and Settings\USERNAME\My
Documents\" + ActiveDocument.Name
   ActiveDocument.SaveAs OrName
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.