Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function StartMe()
{
var path = this.path;
var fields;
path = path.substring(path.indexOf("?")+1,path.length);
fields = path.split("&");
var i;
for (i=0;i<2;i++) {
switch (fields[i].charAt(0)) {
case 'A':
var A = this.getField("A");
A.value = fields[i].substring(2,fields[i].length);
break;
case 'B':
var B = this.getField("B")
B.value = fields[i].substring(2,fields[i].length);
break;
}
}
}
}
Sub InsertFormCaptures()
'------ Written by Theo Callahan 4/2003 -------------
Const DOC_FOLDER As String = "C:\Documentation"
Dim objCurrent As AccessObject
Dim frmCurrent As Form
Dim strFormName As String
Dim blnNeedToClose As Boolean
Dim Acroapp As CAcroApp
Dim avCodeFile As CAcroAVDoc
Dim avFormCapture As CAcroAVDoc
Dim pdCodeFile As CAcroPDDoc
Dim pdFormCapture As CAcroPDDoc
Dim lngPage As Long
Dim AVPage As CAcroAVPageView
Dim PDPage As CAcroPDPage
'Start Acrobat in the background
Set Acroapp = CreateObject("AcroExch.App")
'Uncomment the following line if you want to watch the program run
Acroapp.Show
Set avCodeFile = CreateObject("AcroExch.AVDoc") 'This is the code file
Set avFormCapture = CreateObject("AcroExch.AVDoc") 'This will be each jpg in turn
'Open the already created code file
avCodeFile.Open DOC_FOLDER & "\CodeFile.pdf", "Code File"
Set pdCodeFile = avCodeFile.GetPDDoc
'Loop through each form. We have to use the AllForms collection because Forms
'only shows open forms. In order to document all of them, we loop through
'the AllForms collection and open forms as needed. They have to be open for
'us to check whether or not they have modules(associated code)
For Each objCurrent In CurrentProject.AllForms
'Open the form if it's not already open
If Not objCurrent.IsLoaded Then
blnNeedToClose = True 'This reminds us to close the form when done
DoCmd.OpenForm objCurrent.Name, acDesign, , , acFormPropertySettings, acWindowNormal
Set frmCurrent = Application.Screen.ActiveForm
strFormName = frmCurrent.Name
Else
blnNeedToClose = False
Set frmCurrent = Forms(objCurrent.Name)
strFormName = frmCurrent.Name
End If
'Open the jpg file
avFormCapture.Open DOC_FOLDER & "\" & strFormName & ".jpg", ""
Set pdFormCapture = avFormCapture.GetPDDoc
If frmCurrent.HasModule Then 'if there's code, look for the right spot
'Look for the form name and ' - 1' in the code file: that's page 1 of code
avCodeFile.FindText "Form_" & strFormName & " - 1", 0, 0, 1
Set AVPage = avCodeFile.GetAVPageView
'Go to the page just before the form's code
lngPage = AVPage.GetPageNum - 1 'we want page before
If lngPage < 0 Then lngPage = 0
Else
'If there's no code, throw the form in the back of the package
lngPage = pdCodeFile.GetNumPages - 1
End If
'Insert the jpg at the right page
pdCodeFile.InsertPages lngPage, pdFormCapture, 0, 1, 0
'Unfortunately, there is no page 0 so the first form comes AFTER the first
'page of code if it's on page 1. We need to swap the image and code if that's the
'case
If lngPage = 0 Then pdCodeFile.MovePage 1, 0
'Close the jpg file
pdFormCapture.Close
avFormCapture.Close 1
Set pdFormCapture = Nothing
'If we need to, close the form
If blnNeedToClose Then DoCmd.Close acForm, strFormName, acSaveNo
Next objCurrent
'close the doc file now with form captures
pdCodeFile.Close
avCodeFile.Close 0
'Exit Acrobat
Acroapp.Exit
Set objCurrent = Nothing
Set frmCurrent = Nothing
Set Acroapp = Nothing
Set avCodeFile = Nothing
Set pdCodeFile = Nothing
Set avFormCapture = Nothing
End Sub
Dim oIE as object
Set oIE = CreateObject("InternetExplorer.Application")
If oIE is Nothing then
MsgBox "Could not create IE object"
Stop
End If
URL = "[URL unfurl="true"]http://www.url.com/adobe.pdf"[/URL]
oIE.Navigate URL
While oIE.Busy
DoEvents
Wend
oIE.Visible = true
SendKeys "Inputting to the Form",-1