Hi here's my VBA code that I want to use in VB.NET.
I'm do not know the new syntax's in VB.NET in order for this to work. It basically converts .doc files to .rtf.
PLEASE HELP.
I'm do not know the new syntax's in VB.NET in order for this to work. It basically converts .doc files to .rtf.
PLEASE HELP.
Code:
Dim aDoc
Dim tempFilename As String = "c:\test.txt"
'Application.ScreenUpdating = False
aDoc = Dir("c:\test\*.doc")
Do While aDoc <> ""
Documents.Open(FileName:="c:\Test\" & aDoc)
' strip off .doc from the name
tempFilename = Left(aDoc, (Len(aDoc) - 4))
ActiveDocument.SaveAs(FileName:="c:\test\rtf\" & tempFilename, fileformat:=wdFormatRTF)
ActiveDocument.Close(wdDoNotSaveChanges)
aDoc = Dir()
Loop
Application.ScreenUpdating = True
[\code]