KristianDude
Technical User
I am back with another!.. I feel like I am so close to getting this but have exhausted my energies on it. I am taking a screenshot and placing it into word, but would also like the functionality of saving the image to a file. Can anyone see my error in this logic please?!.. or if there is a better cleaner method vs using executemso?? Thank you!! :]
Something else I also tried and had no luck with was... anything works for me as long as it works!! :]
Code:
Set oCC = ActiveDocument.SelectContentControlsByTitle("ctrlPicture").Item(1)
oCC.Range.Select
Selection.Paste
Selection.Copy
oCC.Range.Select
CommandBars.ExecuteMso "ObjectSaveAsPicture", fileName:=ActiveDocument.Path & "\Weather " & Format(Date, "mm-dd-yy") & ".jpg"
Selection.MoveRight
Selection.Collapse
clipboard.Clear
Something else I also tried and had no luck with was... anything works for me as long as it works!! :]
Code:
SavePicture Clipboard.GetData, ActiveDocument.Path & "\Weather " & Format(Date, "mm-dd-yy") & ".jpg"