-
Regarding the document name
I suppose you have to strip the extension off .Name
Bearing in mind we could be dealing with .docx soon, and also users can mess with names and extensions without affecting the file, I would use a function that caters for those eventualities[VBA]Sub test()
Dim strDocName As String
strDocName = GetDocName(ActiveDocument)
End Sub
Function GetDocName(docDocument As Document) As String
Dim DotPos As Long
DotPos = InStr(1, docDocument.Name, ".")
If DotPos > 0 Then
GetDocName = Left(docDocument.Name, DotPos - 1)
Else
GetDocName = docDocument.Name
End If
End Function[/VBA]
K :-)

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules