Try the VBA "Dir" function. You can use it to see if a file exists. It might also work to determine if a folder exists. I will try it when I have time and let u know.
Actually, the user clicks a command button called cmdSaveExit. This, calls FillForm which basically writes a bunch of text to a Word file using FillForm1. Once this finishes, cmdSaveExit saves the Word document then unloads all the user forms. The problem might have something to do with the...
Not sure what line you get error on.
Have you tried Application.ActiveDocument.Path
Example c:\myfolder
This gives the path of the active document
Application.ActiveDocument.Name gives the name of the active document
Example Filename.doc
You must make sure the file has been saved first or you...
I use the code below to search for a bookmark then replace the default value with a new string. The problem is it is very slow. I have to replace about 50 bookmarks for a form and so it takes > say 10 seconds.
I have turned off screen updating before calling this routine, but you can still...
I am trying to udate a user form just before I update a Word document. I try to change the text and colour of a text box but nothing changes unless I step through the program. Any ideas?
Public Sub FillForm(btnOKClicked As Boolean)
'change status text box
frmQuoteClosing.txtStatus.BackColor...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.