Hi,
Think should be able to work this out for myself but struggling
I have a form with a web browser control.
I want to view the pdf then decide which folder to save it to, so after closed immediately have the choose folder (ApplicationFileDialog.. stuff
I open the form, then once open & ready, load the document (often a PDF but could be jpg etc)
I do this after as use the same webform from different locations & also prefer no buttons on the subform
I found that this method of webcontrol just works best for general use rather that trying to set source etc.
Of course if opened ,,,,,acDialog it does not do the Forms!WBSubForm.WB1.Navigate bit.
Any ideas?
many thanks I/A.
Think should be able to work this out for myself but struggling
I have a form with a web browser control.
I want to view the pdf then decide which folder to save it to, so after closed immediately have the choose folder (ApplicationFileDialog.. stuff
I open the form, then once open & ready, load the document (often a PDF but could be jpg etc)
I do this after as use the same webform from different locations & also prefer no buttons on the subform
I found that this method of webcontrol just works best for general use rather that trying to set source etc.
Of course if opened ,,,,,acDialog it does not do the Forms!WBSubForm.WB1.Navigate bit.
Any ideas?
many thanks I/A.
Code:
strInputFileName = VarDirectory & "\" & Me!AttachmentsList ' caution no forward /. else get virus warning check
' Application.FollowHyperlink strInputFileName
stdocname = "WBSubForm"
DoCmd.OpenForm stdocname
Do Until Forms!WBSubForm.WB1.Object.ReadyState = AcWebBrowserState.acComplete
' Debug.Print Forms!WBSubForm.WB1.Object.ReadyState
DoEvents
Loop
Forms!WBSubForm.WB1.Navigate (strInputFileName) '(Forms!emailPaste!SendAttachment)
' #######LATEBINDING - did not need anymore that this, no ref. needed ###########
With Application.FileDialog(4) ' was 3, think 4 is Folder picker -
.AllowMultiSelect = False 'Select only one file
.Title = "Choose Folder To Put In" 'Set dialog title
.ButtonName = "Select Folder" 'Set the button caption
.Filters.Clear 'Make sure the filter list is clear
.InitialFileName = VarDirectory 'Initial file search location
.InitialView = 1 'View as list msoFileDialogViewList
'Show the dialog and test the return
If .Show = 0 Then 'didn't pick a file - exit sub
Exit Sub
Else
Debug.Print .SelectedItems(1)