Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-10-2017, 12:27 PM
bilich bilich is offline VBA to Embed Object Windows 10 VBA to Embed Object Office 2013
Novice
VBA to Embed Object
 
Join Date: Mar 2017
Posts: 3
bilich is on a distinguished road
Default VBA to Embed Object

Hi,



I have a bit of code that works decent, but I would like to update to be cleaner. Right now, when you run the code it will open the dialog box for you to select a file. Once the PDF is selected, it embeds the image on the next page. When this happens it also opens up the PDF. Would there be a way to have the PDF automatically closed out when doing this?

Also, I would like to be able to create a target area for image to go to that I can change the size of and the PDF will adjust to the size of the target area. Is something like that possible?

Any help you can provide is greatly appreciated!

Code:
Option Explicit
Sub AddFileIcon()
    SendKeys "%F{TAB 4} {TAB 5}"
    Dialogs(wdDialogInsertObject).Show
End Sub


Thank you,
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
embed pdf to doc userman Word 9 05-25-2012 08:27 AM
Problem: object library invalid or contains references to object definitions aligahk06 Office 0 08-19-2010 12:29 PM
VBA to Embed Object can i embed name in ppt shumonsaha PowerPoint 1 07-28-2010 06:54 AM
Could not load this object as this object is not present in your computer k.gaurav Office 0 08-17-2009 09:57 PM
Embed pdf in Word doc iainbunt Word 0 12-22-2008 03:05 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft