hi there,
i was trying with both the options but it is not working in vbscript , can
you guess what is the problem here is my code
Function function4(source_file)
Dim objFSO,objWord,objDoc,destination_file,destination_folder,z
'destination_file = "SNIPPET_SEQUENCE.CSV"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWord = CreateObject("Word.Application")
destination_folder = objFSO.GetParentFolderName(source_file)
destinaton_file = destination_folder & "\" & "SNIPPET_SEQUENCE.csv"
'WScript.Echo destinaton_file
objWord.Visible = false
Set objDoc = objWord.Documents.Open(source_file)
'objDoc.Bookmarks.DefaultSorting = wdSortByLocation
Set txt1 = objFSO.CreateTextFile(destinaton_file,ForAppending,true)
'm = objDoc.Bookmarks.count
for x = 1 to objDoc.Bookmarks.count
txt1.WriteLine(objDoc.Range.Bookmarks(x))
txt1.WriteLine(objDoc.Bookmarks(x).range.BookmarkID)
'txt1.WriteLine(objDoc.Bookmarks(x).name)
'txt1.WriteLine(objDoc.Bookmarks(x).range.BookmarkID)
Next
objDoc.close false
txt1.Close
objWord.quit
End Function