To read a File to Textreader in C# and VB.NET you can use the following snippet.
Sample C#
TextReader reader = File.OpenText(@"C:\dummy.txt");
Sample VB.NET
Dim reader As TextReader = File.OpenText(@"C:\dummy.txt")
To read a File to Textreader in C# and VB.NET you can use the following snippet.
TextReader reader = File.OpenText(@"C:\dummy.txt");
Dim reader As TextReader = File.OpenText(@"C:\dummy.txt")
To use the Microsoft Speech API in VBScript you can use the following snippet.
dim sTextToSpeech sTextToSpeech = "HELLO WORLD!" set ObjVoice = CreateObject("SAPI.SpVoice") ObjVoice.Speak sTextToSpeech
To open a pdf at a specific page using AcroRd32Info in C# and VB.NET you can use the following snippet.
public static void OpenPdfAtNamedDestination(string document, string namedDestination) { object myProcess = new Process(); object startInfo = new ProcessStartInfo(); startInfo.FileName = "AcroRd32Info.exe"; startInfo.Arguments = string.Format(" /n /A \"pagemode=bookmarks&nameddest={0}\" \"{1}\"", namedDestination, document) myProcess.StartInfo = startInfo; myProcess.Start(); }
Public Shared Sub OpenPdfAtNamedDestination(document As String, namedDestination As String) Dim myProcess As Object = New Process() Dim startInfo As Object = New ProcessStartInfo() startInfo.FileName = "AcroRd32Info.exe" startInfo.Arguments = String.Format(" /n /A ""pagemode=bookmarks&nameddest={0}"" ""{1}""", namedDestination, document) myProcess.StartInfo = startInfo myProcess.Start() End Sub
To open a pdf at a specific page using AcroRd32Info in C# and VB.NET you can use the following snippet.
public static void OpenPdfAtPage(string document, int page) { object myProcess = new Process(); object startInfo = new ProcessStartInfo(); startInfo.FileName = "AcroRd32Info.exe"; startInfo.Arguments = string.Format("/A \"page={0}\"{1}", page, document); myProcess.StartInfo = startInfo; myProcess.Start(); }
Public Shared Sub OpenPdfAtPage(document As String, page As Integer) Dim myProcess = New Process() Dim startInfo = New ProcessStartInfo() startInfo.FileName = "AcroRd32Info.exe" startInfo.Arguments = String.Format("/A ""page={0}""{1}", page, document) myProcess.StartInfo = startInfo myProcess.Start() End Sub