IT-Academy

Word Editovanie

Aug 11th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub formatujDokumentWord()
  2.    
  3.     Dim objWord
  4.     Dim objDokument
  5.     Dim objVyber
  6.     Dim objTvary
  7.    
  8.     Set objWord = CreateObject("Word.Application")
  9.     Set objDokument = objWord.Documents.Open("D:\Subor.docx")
  10.     objWord.Visible = True
  11.     Set objVyber = objWord.Selection
  12.    
  13.     objVyber.WholeStory
  14.     objVyber.Font.Name = "Calibri"
  15.     objVyber.Font.Bold = True
  16.     objVyber.Font.Color = RGB(256, 0, 0)
  17.    
  18.     objVyber.TypeText (vbNewLine & "Vlozim ti sem obrazok...")
  19.     Set objTvary = objDokument.InlineShapes
  20.     objTvary.AddPicture ("C:\Users\Miroslav\Pictures\Screenshots\img.png")
  21.    
  22.     objDokument.Save
  23.     'objWord.Quit
  24.    
  25. End Sub
Advertisement
Add Comment
Please, Sign In to add comment