PDF through VBA: How to set Initial View?

- Adobe Acrobat 6.0 (sorry we're a bit out of date)
- MS Office 2003
- MS Windows XP Professional SP2
I am trying to automate the creation of PDFs from MS Word. I have succeeded. My VBA code works fine (have pasted it below). I can create a PDF, and give it a title and author.
The problem I am having is with the Initial View settings, i.e. how the document opens. I want to hardcode:
1. Show to "Page Only"
2. Page Layout to "Continuous"
3. Magnification to "Fit Width"
The first I have done, using AcroExch.PDDoc's SetPageMode() function (although it seems to default to that even without doing this). I cannot, for the life of me, find any reference to the second and third, though. This must be doable, right? Be kind of weird not to have access to this in the API.
Hours of Googling has thrown up three ideas I've discarded.
1. AcroExch.App's SetPreference() function. This would presumably change preferences on the machine making the PDF, not reading it. I don't want to fiddle with other people's preferences anyway.
2. AcroExch.AVPageView's ZoomTo() function. Ditto. I am not creating an app to view PDFs, just trying to configure the default for opening one I've created.
3. An "undocumented" SetOpenInfo() in AcroExch.PDDoc. This looked the most promising for Magnification, but nobody seems to be able to get it to work, and it does nothing for me either. Someone somewhere even suggested it had been deprecated in later versions of Acrobat.
So... what do I do?
Thanks in advance for any pointers.
jON
===============================================
Sub MakePDF(strFilename As String, strTitle As String, strAuthor As String)
Dim pdfD As PdfDistiller
Dim strPDFName As String
Dim strPSName As String
strPSName = strFilename & ".ps"
strPDFName = strFilename & ".pdf"
'... make PS
Application.ActivePrinter = myPDFPrinter
Application.PrintOut Filename:="", _
Range:=wdPrintAllDocument, _
Item:=wdPrintDocumentContent, _
Copies:=1, _
Pages:="", _
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, _
Collate:=True, _
Background:=False, _
PrintToFile:=True, _
PrintZoomColumn:=0, _
PrintZoomRow:=0, _
PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0, _
OutputFileName:=strPSName, _
Append:=False
'... make PDF
Set pdfD = New PdfDistiller
pdfD.FileToPDF strPSName, strPDFName, ""
'... tag PDF
Set qq = CreateObject("AcroExch.PDDoc")
b = qq.Open(strPDFName)
b = qq.SetInfo("Title", strProperties_Title)
b = qq.SetInfo("Author", strProperties_Author)
b = qq.SetPageMode(1) '... 1 = PDUseNone
b = qq.Save(33, strPDFName) '... 33 = PDSaveFull (1) OR PDSaveCollectGarbage (32)
b = qq.Close
End Sub

I have the same problem. I need to change Initial View Settings configuring the following settings
2. Page Layout to "Single Page"
3. Magnification to "Fit Width"
My software configuration is as follows:
- Adobe Acrobat 7.9
- Microsoft Windows XP SP2
- Visual Basic 6
Has anyone worked with this attributes of Acrobat?

Similar Messages

  • How to set the view privilege of a portlet?

    Dear all,
    I would like to ask how to set the view privilege of a portlet (which is located on the Intranet homepage) to only a group of users?
    As far as I know, I can create a tab with view privilege to address the about scenario. But is it possible to directly set the view privilege to the portlet ?
    thanks
    George (HK)
    Welcome to my photo albums at http://community.webshots.com/user/GeorgeLee80
    Message was edited by:
    georgelkh

    OK, you got me there George. I don't know where you can set view rights to an out of box portlet. So how about a different approach?
    1) Create a blank page with no nav bar or anything else
    2) Assign the group you want to see the notifications portlet view rights on the page
    3) Make sure the show as portlet check box is checked on the Optional tab in the page properties
    4) Add the notifications portlet to the page
    5) Ensure the portlet settings are how you desire in terms of what notifications to show and the region settings are how they should be in terms of border, headers, etc
    6) Edit the page where you want the notifications portlet to be shown and add the page portlet you just created instead of the notification portlet
    This should achieve what you seek without having to dig into out-of-box portlets.
    Rgds/Mark M.

  • WD- SALV- Setting initial View dynamically

    Hi everyone,
    I'd like to have 2 different ALV initial views, depending on certain conditions in my program (two buttons, each of them calling the same ALV, but with different initial View)
    I'm settung at runtime the config_key when I initialize the ALV component, as Regina Breuer explained in the following forum
    Re: WDA ALV initial view
    After I run the program and I click on one of the buttons it works fine. But the initial view doesn't change even if I click on the other button, although in debugging mode I can see that the correct configuration key is being set.
    For any suggestions I woud be very pleased!
    Best Regards,
    Christian

    Hi Baldari,
    Please check this also..
    WD -SALV- setting initial view
    Cheers,
    Kris.

  • Batch create multiple pdf's while using epilogue.ps for setting initial view and opening bookmarks

    Hi,
    I'm trying to batch create multiple pdf's from word files, and use the epilogue.ps file for setting the initial view and opening the bookmarks panel, but i keep getting no satisfying result.. i'm probably missing something fundamental.
    I've read some forum posts and adobe help posts explaining this, so i'm pretty sure this would be possible?
    Reference:
    http://help.adobe.com/en_US/acrobat/X/pro/using/WS58a04a822e3e50102bd615109794195ff-7f0f.w .html  see advanced panel options
    http://help.adobe.com/en_US/acrobat/using/WS58a04a822e3e50102bd615109794195ff-7f14.w.html
    System: Windows 7
    Acrobat: Acrobat X professional
    i've searched for and found a way to overwite the epilogue.ps file and have inserted the following:
    %  Insert your custom PostScript here...
    [ /PageMode /UseThumbs
    /Page 1 /View [/Fit ]
    /DOCVIEW pdfmark
    After that i checked my Adobe Acrobat preferences, and in the categorie 'Convert to Pdf' i selected 'Microsoft office word' in the select area 'Converting to pdf'.
    Clicked 'Edit settings' to allow creating a joboptions file (field: 'adobe pdf settings') which has the option 'Use epiloque.ps and prologue.ps' checked in the advanced section.
    So now i thought i would have everyting setup to create my pdf's, however, my view isn't changed to fit, nor are there any bookmarks or in this case thumbs (i used /useThumbs) visible.
    Did i miss something obvious? Is there a better way to test this? Any help would be appreciated!

    i like it about that ok in how to open my site

  • Setting Initial View of .PDF when exporting from ID

    Hi,
    I use 5.0.1 and upgrading is not an option due to the IT department - don't get me started!
    I have created a document in ID with Bookmarks to aid navigation when its converted to a PDF.
    In Acrobat 8.0 there is a feature to set the initial view to open the pdf with the bookmarks tab showing - Document Settings > Initial View > Layout & Magnification > Bookmarks Panel & Page.
    Is it possible to set this attribute in ID without having to use Acrobat after creating the pdf? i.e when I export the ID file to pdf it is effectivly fire and forget.
    Thanks in advance all...

    No need to apologize - I'm a rookie when it comes to IS detail.
    I use Acrobat Standard 8.1 when setting the initial view and IE 7. There are no security settings set.
    I'm posting the documents on a web site and others that open to view are most likely using Acrobat Reader.
    Not certain what I should try next. I appreciate your help.

  • Setting Initial View Folder for All Users at Once and Forever. How???

    <p>Is there any way to make the initial view of all users to be a specific folder? What I want to acomplish it to show my public folders expanded and always showing a specific folder. I can do it for myselft but what about a global setting?</p>

    I tried the following code and it does not appear to work.  Why?
    Our goal is to take the destop preferences of a selected user and apply those preferences to all other users.  How can that be done?  Note:  We need to apply those preferences whether they have already set their preferences or not.
         Dim oSourceUser As InfoObject
                Dim oTargetUsers As InfoObjects
                bErrorOccurred = False
                oSourceUser = oInfoStore.NewInfoObjectCollection().InfoStore.Query("SELECT SI_NAME, SI_DATA FROM CI_SYSTEMOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.User' And SI_Name = '" & vstrSourceUserID & "'").Item(1)
                If vstrTargetUserID.Length > 0 Then
                    oTargetUsers = oInfoStore.NewInfoObjectCollection().InfoStore.Query("SELECT SI_NAME, SI_DATA FROM CI_SYSTEMOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.User' And SI_Name = '" & vstrTargetUserID & "'")
                Else
                    oTargetUsers = oInfoStore.NewInfoObjectCollection().InfoStore.Query("SELECT SI_NAME, SI_DATA FROM CI_SYSTEMOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.User' And SI_Name != '" & vstrSourceUserID & "'")
                End If
                For Each oUser As InfoObject In oTargetUsers
                    Try
                        oUser.Properties.Add("SI_DATA", oSourceUser.Properties("SI_DATA").Properties)
                    Catch ex As Exception
                        bErrorOccurred = True
                        If ex.Message.Length = 0 Then
                            strLastError = "Unknown Error Occurred"
                        Else
                            strLastError = ex.Message
                        End If
                        Exit For
                    End Try
                Next
                If bErrorOccurred = False Then oInfoStore.Commit(oTargetUsers)

  • How to set default view for preview?

    Every time I open a PDF using Preview I have to set the view to 'thumbnails', then 'two pages up', then adjust the zoom. Complete waste of time.
    Anyone know how to set defaults so that it opens in a predictable way?
    thanks,

    I customized my Toolbar to look like the following. Click the middle button that has the 1 circled. That tells Preview to remember to display pages at actual size (100%). Every file that I open now displays at 100%.

  • VBA Macro to Set Current View

    Does anybody know what command I could use in VBA to change the Current View in Excel for BPC 7M?
    Edited to add:
    I'm aware of the MNU_eTOOLS_MEMBERSELECTOR_x macro.  What I'm looking for is code to change the current view systematically without going through the member selector.
    Edited by: Will Leonard on Feb 22, 2010 1:26 PM

    Hi,
    Whenever I would like to change the current view via VBA, I use the methods which are released by opening a custom menu. However in most of the cases you dont want your end user to open a custom menu, but you would like to have the methods. Therefore I always do the following to simulate a custom menu (steps 1 to 4 can also be performed by opening a custom menu template and delete the unnessecary data).
    1) Create a new workbook and add the three new sheets
    2) Name the sheets, EV__RESULT,EV__MENUSTYLE and EV__DEFAULT
    3) In the sheet EV__DEFAULT type %DEFAULT% in range("A3")
    4) In the same sheet enter on row 4 the following items accross the columns:
    -%MenuItem%
    - Level
    - Action
    - P1
    - P2
    - P3
    - P4
    - CVOverride
    - NomalScreen
    5) Open the VBA editor and under thisworkbook module enter the following code:
    Private Sub Workbook_Open()
    Application.Run "MNU_ETOOLS_PSMANAGER_COMPILE"
    End Sub
    This code will compile the custom menu and will release all methods within it
    6) To change the current view enter the following code
    Sub Change_CV
    Application.Run "EVMACROCALL", "EVGOTOHOMESHEET", "", "", "", "", "<Your dimension>=<Your ID>", ""
    End sub
    Replace <Your dimension> with the dimension for which you would like to change the current view
    Replace <Your ID> with the member id code
    7) Hide the three sheet (EV__XXX).
    8) Close the file.
    9) Re-open the file and run the macro Change_CV and see if the CV has changed.
    You will now be able to change the current view via VBA. Only downside is that whenever the document is closed the methods will not be available anymore.
    BTW you can call any MNU command (e.g MNU_ETOOLS_REFRESH) and Custom menu function. For more information on the custom menu function see the help function and search for "Using custom menu functions". Refer to the CVoverride for an example on how to change the Current view between applications etc.
    HTH,
    Peter
    Edited by: d. G. PETER on Jun 4, 2010 4:23 PM

  • How to convert initial view (bookmarks expanded) in over 1000 pfd files?

    Could anybody please assist with how to complete a blanket change to over 1000 PDF files? I would like to change the security of the initial view so that the file opens with the bookmark tab already expanded. I am able to do this to each file individually but no more than one at a time. Any suggestions out there? Check out the attachment if clarity needed. Thanks ahead of time.

    The selections are under the document properties (ctrl-D) as to how the document opens, at least that is what I think you are asking.

  • WD -SALV- setting initial view

    Hi everyone,
    I saw some forums in SDN about setting the initial View in a SALV.
    Someone suggested to use R_COMPONENT of type IF_SALV_WD_COMP_TABLE_PERS in order to call the method SET_STANDARD_VIEW.
    But noone was able to indicate how r_component could be properly referenced. (Such Forums are anyhow marked as closed but unanswered).
    I would be very pleased to know if someone managed to do it, and how.
    Thank you so much.
    Best Regards,
    Christian

    Hi,
    Please refer to this code and make changes accordingly as per the conditions -
    METHOD wddoinit.
      DATA:
        lo_nd_mara                 TYPE REF TO if_wd_context_node,
        lt_mara                    TYPE        wd_this->elements_mara,
        lo_cmp_usage               TYPE REF TO if_wd_component_usage,
        lo_interfacecontroller     TYPE REF TO iwci_salv_wd_table ,
        lo_api_interfacecontroller TYPE REF TO if_wd_controller,
        lo_pers                    TYPE REF TO if_wd_personalization,
        lv_value                   TYPE REF TO cl_salv_wd_config_table,
        lt_var                     TYPE        wdr_pers_variants,
        wa_var                     TYPE        wdr_pers_variant,
        ls_config_key              TYPE        wdy_config_key.
    * navigate from <CONTEXT> to <MARA> via lead selection
      lo_nd_mara = wd_context->get_child_node( name = wd_this->wdctx_mara ).
    * Get material master data
      SELECT * FROM mara INTO TABLE lt_mara UP TO 10 ROWS.
    * @TODO handle non existant child
      IF lo_nd_mara IS NOT INITIAL.
        lo_nd_mara->bind_table( new_items = lt_mara set_initial_elements = abap_false ).
      ENDIF.
    * Instantiate ALV
      lo_cmp_usage =   wd_this->wd_cpuse_alv_materials( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
    * Get the interface controller of the component usage
      lo_interfacecontroller =   wd_this->wd_cpifc_alv_materials( ).
    * Get the model object of ALV
      IF lo_interfacecontroller IS NOT INITIAL.
        lv_value = lo_interfacecontroller->get_model(
    * Get the API reference
        lo_api_interfacecontroller = lo_interfacecontroller->wd_get_api( ).
      ENDIF.
    * Get personalization obect
      IF lo_api_interfacecontroller IS NOT INITIAL.
        CALL METHOD lo_api_interfacecontroller->get_personalization_manager
          RECEIVING
            pers_manager = lo_pers.
      ENDIF.
    * Get variants
      IF lo_pers IS NOT INITIAL.
        CALL METHOD lo_pers->get_variants
          RECEIVING
            variants = lt_var.
      ENDIF.
    * Set the default variant
    * Required variant is read
    * READ statement can be modified as per the requirement.
    * As this application holds only one user variant, first record is read.
    ##read the respective records based on your condition
      IF lt_var IS NOT INITIAL.
        READ TABLE lt_var INTO wa_var INDEX 1.
        IF sy-subrc EQ 0.
          ls_config_key-config_id    = wa_var-config_id .
          ls_config_key-config_type  = wa_var-config_type.
          ls_config_key-config_var   = wa_var-config_var.
        ENDIF.
        TRY.
            CALL METHOD lo_pers->set_default_variant
              EXPORTING
                config_key = ls_config_key
                set        = abap_true.
          CATCH cx_wd_personalization .
        ENDTRY.
    * Get the variant information based on variant id
    * Load the variant/ Set the default variant
        CALL METHOD lo_pers->load_config_by_key
          EXPORTING
            config_key            = ls_config_key
            fetch_default_variant = abap_true.
      ENDIF.
    ENDMETHOD.
    Regards,
    Lekha.

  • How to set the view, which has to be shown at runtime?

    Hi,
    in my application i have more than one view, but at runtime only one of these views has to be shown. I want to decide this via a parameter that I get from the url.
    How can i set the right view to be showing at runtime?
    I tried it with a StartView which fires the right Outbound Plug in his wdDoInit-Method. This is working fine, but the problem is, that the method OnPlugDefault() of ComponentInterfaceViewController isn't called already at this time. So in the Init-Method of the StartView I don't have the given URL Parameter, so I can't decide which Plug I want to fire. The method OnPlugDefault() is called only after the init-method of the StartView.
    Is there any other possibilty to set the view, which has to be shown, at runtime?
    Thanks and Best Regards
    Katharina

    Hi,
    One way is you can pass the parameter in the URL , read the parameter and then fire the outbound plug depending upon that.
    You can read the parameters as follows
    HttpServletRequest request =Task.getCurrentTask()
         .getWebContextAdapter()
         .getHttpServletRequest();
    String[] param1 = request.getParameterValues("<<PARAMETRNAME");
    if(param1.equals("VALUE"))
      fire outbound plug1;
    Regards, Anilkumar

  • How to set default view in Adobe Reader 9?

    I am trying to figure out how to set adobe reader so that when you open a document you automatically get the page view on the right side come up and the document in full mode.  I have researched registry edits and also the customize wizard with no luck.  Does Adobe Reader have the capability to set these as defaults on any document?  I have the application setup to remember what I did so if I open the same document it will show pages and be in full mode; however, if I open a new document, I have to select the icon on the left to display pages and then set to full mode.  Thanks Joe

    Does Adobe Reader have the capability to set these as defaults on any document?
    Adobe Acrobat can do this, not Adobe Reader.

  • How to set the View instance and view  attribute to lov field ?

    Hi
    I created lov and textfield programatically.
    I want to set the viewattribute and view instance to that items(lovbean, texfieldbean).
    How to set programatically?
    Thanks in Advance
    Awadesh

    Hi
    Thanks. Its working fine. But now i got some another issue.
    after setting, i put simple system.out.println(Pagecontext.getparameter("idoflov"));
    But it returns null value.
    why. Actully i want to pass this value (according to my requirement).
    The view instance and view attribute are setting correctly. But after that i checked means it returns null value .
    plz let me know.
    Thanks

  • Need to set "initial view" to two up and fit page

    Newbie here, I apologize for such a basic question:
    It's easy to set an open document view to "two up" and "fit page":
    this.zoomType = zoomtype.fitP;
    this.layout = "TwoColumnLeft";
    However, I cannot seem to find the properties to set the "initial view" to the same view.
    "initial.zoomType" and "initial.layout" do not work.
    Any ideas?  Thanks, JB

    "initial.zoomType" and "initial.layout" do not work.
    This properties doesn't exist. Did you read the documentation?

  • How to set default view and commands

    I have Acrobat Standard 9, and I wish to set the default for opening files to a full page view with one-page-at-a-time scrolling.  I routinely open many PDF files and have to scroll through the entire document.
    I managed to get the full page view to work, but not the full page scrolling .  Currently, when I open the document, the mouse wheel scrolls the document continuously several lines at a time.  What I want is for the mouse wheel to scroll the document one full page at a time (page up/page down).  I can manually set this by selecting the "Full Page" button on the tool bar (the one with the four arrows), however this is another step I have to perform each time I open a document.
    Is there any way to set the full-page scroll by default?

    Thank you for your help with this.
    Although I can not fix the default view, changing the document properties at least allows me to regulate how it opens the next time.  (Almost as good).
    If anyone from Adobe reads this, a tip for the next version: Please include a setting that would include a forced default view.

Maybe you are looking for

  • "My Day" widget for iCal?

    Hi-- I'm about ready to give up on Office and switch to iWork, but the one feature that is (perhaps stupidly) holding me back is Entourage's brilliant "My Day" widget: <http://www.microsoft.com/mac/products/entourage2008/default.mspx#/my_day/> Is the

  • [SOLVED] Jmicron ethernet card doesn't work

    HI there, I am installing Arch64 on Sager NP8170 laptop. Networking card is Jmicron PCI Express Gigabit Ethernet Adapter, which is controlled by kernel-build module JME. Command lsmod | grep jme shows that module is loaded. Ping to sites does not wor

  • Iterating inside a script task - SSIS 2012

    Hi, in order to create SSAS partitions I need to read a SQL Server table where I've year and month value. So I think to iterate for each row inside the data set returned by the read operation and for each year and month value to create a SSAS partiti

  • "Software caused connection abort: recv failed" from Applet in IE to JBoss

    Hi We have an application hosted as applets on our web-site, but offer the same application to customers as a "standalone" off-line version. This off-line version is the same code-base, deploy and HTML but run from the local file system (in the absen

  • Is there a way to hide and unhide specific files programmatically using Labview?

    I writing an application that produces 3 binary data files and I want the user to only see 1 of the 3 files. I'm using Labview 6.1 and windows 2000.