Results 1 to 2 of 2
  1. #1
    mortonsafari is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2015
    Location
    Brisbane, Queensland, Australia
    Posts
    35

    Save to Sharepoint

    I do volunteer work with a small not-for-profit charity and the organisation is now transforming from desktops and network drives to a “cloud based environment” utilising Microsoft 365 and Sharepoint.



    I have built up an Access 2007-2016 database of Professionals and Contacts which can be searched by the user for various information.

    When the search is conducted through a form, the results display in a report in print preview mode, with a pop-up print dialog giving the user options – Print – Create PDF – Email PDF – Close Report.

    All reasonably straightforward under the ‘old system’.

    The creation of the PDF and saving to Nework Drive was handled by the following –

    [ Private Sub bCreatePDF_Click()
    On Error GoTo bCreatePDF_Click_Err

    'Message to identify where report pdf is located
    MsgBox "The original PDF file will be located in the PUBLIC (P:\) drive" & Chr(10) & _
    " in the 'Main Folder' folder as 'ProfContREGION2.pdf'" & Chr(10) & " should you need it." & _
    Chr(10) & Chr(10) & "Clicking the OK button will create the 'pdf' Report."
    'Cancel the action
    Cancel = True

    DoCmd.OutputTo acOutputReport, "rREGION-Filter2", "PDFFormat(*.pdf)", "P:\ASA-Staff-Documents\ProfContREGION2.pdf", True, "", 0, acExportQualityPrint

    bCreatePDF_Click_Exit:
    Exit Sub

    bCreatePDF_Click_Err:
    MsgBox Error$
    Resume bCreatePDF_Click_Exit

    End Sub ]


    The creation of the email and attached PDF was handled by the following –

    [ Private Sub bEmailPDF_Click()
    On Error GoTo bEmailPDF_Click_Err

    DoCmd.SendObject acReport, "rREGION-Filter2", "PDFFormat(*.pdf)", "", "", "", "", "", True, ""

    bEmailPDF_Click_Exit:
    Exit Sub

    bEmailPDF_Click_Err:
    MsgBox Error$
    Resume bEmailPDF_Click_Exit

    End Sub ]

    I now want to have the PDF file created saved to the Sharepoint folder –
    Resources \ DatabasePDF.

    The full path appears to be -
    https://organisationname.sharepoint....%2FDatabasePDF

    What is the best way to have the PDF file saved to the Sharepoint folder?

    What is the best way to be able to create the PDF file and open a blank email with the PDF as an attachment?

    Once again, any assistance from the gurus out there will be appreciated.

    Kind regards
    mortonsafari

  2. #2
    mortonsafari is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2015
    Location
    Brisbane, Queensland, Australia
    Posts
    35
    I have solved one of my issues . . . saving to the Sharepoint site . . . . by using the following . . .

    [ DoCmd.OutputTo acOutputReport, "xxxxxxxxxx", "PDFFormat(*.pdf)", _
    "https://organisation.sharepoint.com/Resources/DatabasePDF/xxxxxxxxxxx.pdf", _
    True, "", 0, acExportQualityPrint ]

    Hope that helps someone else. (Now for the email!!%%$#!)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-26-2018, 01:41 PM
  2. Replies: 0
    Last Post: 09-18-2017, 09:02 AM
  3. Using DAO to save attachments from SharePoint List
    By Wendie1970 in forum Code Repository
    Replies: 6
    Last Post: 07-14-2017, 11:44 AM
  4. Replies: 0
    Last Post: 03-24-2014, 09:35 AM
  5. Refresh SharePoint List - SharePoint 2010
    By jgelpi16 in forum Programming
    Replies: 0
    Last Post: 08-22-2013, 06:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums