Problemo Solvedo!
Guys, you were right all along. It is because of an illegal character. I stepped through the procedure and after this step:
NewFileName = ActiveDocument.Shapes("Text Box 2").TextFrame.TextRange.Text
I hovered the mouse cursor over NewFileName and noticed a little square...
I also posted this question here:
http://www.vbaexpress.com/forum/showthread.php?p=164420#post164420
http://www.xtremevbtalk.com/showthread.php?t=301722
Hallo Guys,
In Word, I want to take the text in a textbox in the active document and use it as the filename for the active document by using the SaveAs method. Here is the code:
Sub Rename_ActiveDocument()
Dim NewFileName As String
NewFileName = ActiveDocument.Shapes("Text Box...
Hallo Guys,
In Excel 2007, I have made a custom spreadsheet function. When I start typing the function in a cell on a sheet, a list of functions that start with the same letters appears and then I can select my custom function from the list. This makes entering the function much faster...
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.