-
I won't be able to solve your problem, but there is a macro which always shows the directory the doc file is in.
So, let's say your doc file is in c:\x\y\mypictures\mygreatpictures and you want to insert a picture the dialog box will open in that exact directory and you don't have to navigate to this directory.
But unfortunately it's not a normal macro but you need to create a module named "AutoExec" with this code
Option Explicit
Private objImagePath As clsImagePath
Public Sub AutoExec()
Set objImagePath = New clsImagePath
Set objImagePath.obj = Word.Application
End Sub
...and another class module containing this code:
Option Explicit
Public WithEvents obj As Word.Application
Private Sub obj_DocumentChange()
If Word.Documents.Count > 0 Then
Options.DefaultFilePath(Path:=wdPicturesPath) = ActiveDocument.Path
End If
End Sub
And the class module needs to have the name clsImagePath
P.S: Creating a button which invokes the insert image dialog box should be easy. You can accomplish this by recording a macro and assigning a button to this macro.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules