Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2014, 05:03 PM
smndnm smndnm is offline refering to the msoFileDialogueOpen variants Windows 7 64bit refering to the msoFileDialogueOpen variants Office 2010 64bit
Novice
refering to the msoFileDialogueOpen variants
 
Join Date: Jul 2014
Location: Queensland
Posts: 24
smndnm is on a distinguished road
Default

I'll need sometime to digest your code. However I have this so far which appears to work quite well. I'll fully test it today. There are aspects here that I do not understand, mostly about the when and how of declaring and retreiving variables. But I have a result of sorts.

Code:
Sub Main()

Dim i As Long
Dim tgf As String
Dim filenametitle As String
With Application.FileDialog(msoFileDialogFolderPicker)
    .AllowMultiSelect = False
    .Title = "Select Folder for..."
    .Show
    tgf = .SelectedItems(1)
End With

MsgBox tgf

 
    Dim vrtSelectedItem As Variant


    With Application.FileDialog(msoFileDialogFilePicker)
        .AllowMultiSelect = True
        If .Show = -1 Then

          
            For Each vrtSelectedItem In .SelectedItems

                Documents.Open FileName:=vrtSelectedItem
                Options.DefaultFilePath(wdDocumentsPath) = tgf
                filenametitle = ActiveDocument.BuiltInDocumentProperties("Title")
                With Dialogs(wdDialogFileSaveAs)
                .Name = filenametitle
                .Format = wdFormatPDF
                .Execute
                ActiveDocument.Close SaveChanges:=False


    End With


        Next

        Else

        End If

    End With


Shell "C:\program files (x86)\adobe\acrobat 11.0\acrobat\acrobat.exe", vbNormalFocus

End Sub

Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Refering figure number too text danzi Word 1 01-20-2012 12:13 PM
Refering to photos on other pages woodfind Word 1 05-17-2010 01:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:26 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