![]() |
#1
|
|||
|
|||
![]()
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, |
#2
|
||||
|
||||
![]()
Word is not a PDF editor. What exactly is it that you are trying to do?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
![]()
Could you be a little more specific about the steps you're taking? It's tough to know what the process is that you're using now, especially when you're using send keys...
As I'm sure you might already know, most people recommend avoiding using send keys at all costs because they're so volatile. It would probably be best to completely rewrite your code from the beginning while avoiding send keys all together. |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
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 |
![]() |
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 |