+ Reply to Thread
Results 1 to 2 of 2

Create pdf print of every slicer item

  1. #1
    Registered User
    Join Date
    08-09-2011
    Location
    Utrecht
    MS-Off Ver
    Excel 2013
    Posts
    48

    Create pdf print of every slicer item

    Hi,

    Problem: Is there any solution how I can automize creating pdf prints of all of the slicer items within a pivotchart?
    Current as is: I have 6 pivotgraphs that I control with my slicer.

    I hope that my question is clear ...

    Cheer, Jeroen

  2. #2
    Registered User
    Join Date
    08-09-2011
    Location
    Utrecht
    MS-Off Ver
    Excel 2013
    Posts
    48

    Re: Create pdf print of every slicer item

    This is what I have got so far, however excel gives me an error message on the row: "Call saveaspdf(1)...The error message is: "compile error...Wrong number of arguments or invalid property assignment...

    Can someone help me?


    PHP Code: 
    Sub Step_Thru_SlicerItems()
        
    Dim slItem As SlicerItem
        Dim i 
    As Long
        
        Application
    .ScreenUpdating False
        With ActiveWorkbook
    .SlicerCaches("Slicer_Store")
            .
    SlicerItems(1).Selected True
            
    For Each slItem In .VisibleSlicerItems
                
    If slItem.Name <> .SlicerItems(1).Name Then _
                    slItem
    .Selected False
            Next slItem
            Call saveaspdf
    (1)
            For 
    2 To .SlicerItems.Count
                
    .SlicerItems(i).Selected True
                
    .SlicerItems(1).Selected False
                Call saveaspdf
    (i)
            
    Next i
        End With
        Application
    .ScreenUpdating True
    End Sub

    Sub saveaspdf
    ()

    Dim rngRange        As Range

    Set rngRange 
    Worksheets("Pivot Graphs").Range("B2")

    Sheets("Pivot graphs").Activate
    ActiveSheet
    .ExportAsFixedFormat Type:=xlTypePDFFilename:= _
        
    "\\vmware-host\Shared Folders\Desktop\Sales booster dashboard\Dashboard per winkel\" & rngRange & ".pdf" _
        , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
        :=False, OpenAfterPublish:=False

    End Sub 

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Print Graphs using Specific Items from Slicer List
    By Tellm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-09-2015, 02:53 PM
  2. Workbook_Open to select first item in slicer/pivot
    By kev_33 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2015, 01:08 AM
  3. VBA code to create input box that will select one value in a slicer
    By Ind711 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2015, 04:19 PM
  4. Selecting a Slicer Item in VBA
    By ManUBlueJay in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2014, 08:21 AM
  5. How to auto select from a Slicer last or top item
    By xtrenge in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-07-2014, 06:22 PM
  6. Create/print a pdf for every item in a list
    By Ellume in forum Excel General
    Replies: 0
    Last Post: 06-21-2012, 09:34 PM
  7. [SOLVED] Print multiple pages from the Slicer
    By JimDandy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-04-2012, 11:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1