adsense


Showing posts with label ADVANCE VB SCRIPT WITH..END WITH. Show all posts
Showing posts with label ADVANCE VB SCRIPT WITH..END WITH. Show all posts

Friday, 13 November 2015

ADVANCE VB SCRIPT WITH..END WITH PAGE 220

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button




ADVANCE VB SCRIPT WITH..END WITH






With..End With 



The With statement allows us to perform a series of operation 
on a specified object without explicitly mentioning the object 
name over again and again. 
Syntax 
  
With (objectname) 
   statement 1 
   statement 2 
   statement 3 
   ... 
   ... 
   statement n 
End With 
Example 
Upon Executing the following script, Winword gets opened 
and the specified text is entered. 
<!DOCTYPE html> 
<html> 
<body> 
<script language="vbscript" type="text/vbscript"> 
 
 Msg =  "Vbscript" & vbCrLf & "Programming" 
 Set objWord = CreateObject("Word.Application") 
 objWord.Visible = True 
  
 ' Objects methods are accessed without requaliyfying the objects again.' 
 With objWord 
     .Documents.Add 
     .Selection.TypeText Msg 
     .Selection.WholeStory 
 End With 
 
   
</script> 
</body> 
</html>