Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub formatujDokumentWord()
- Dim objWord
- Dim objDokument
- Dim objVyber
- Dim objTvary
- Set objWord = CreateObject("Word.Application")
- Set objDokument = objWord.Documents.Open("D:\Subor.docx")
- objWord.Visible = True
- Set objVyber = objWord.Selection
- objVyber.WholeStory
- objVyber.Font.Name = "Calibri"
- objVyber.Font.Bold = True
- objVyber.Font.Color = RGB(256, 0, 0)
- objVyber.TypeText (vbNewLine & "Vlozim ti sem obrazok...")
- Set objTvary = objDokument.InlineShapes
- objTvary.AddPicture ("C:\Users\Miroslav\Pictures\Screenshots\img.png")
- objDokument.Save
- 'objWord.Quit
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment