1 Reply Latest reply on Feb 14, 2011 11:15 PM by Cookie4ddict

    [VBScript] PageOrientation of document


      Hi everybody!


      Before I start let me tell you, I used the search function but for some reason it didn't do as I know it. All the results I got linked to the forum of InDesign Scripting and not to a single thread.


      Now to my problem. I'm trying to do a VB within Access which creates a new InDesign-Document. I need a document with landscape orientation. Unfortunately Access is telling me, it needs an object and I don't understand why it is telling me that.


      Here's the little piece of code:


      1 Set appInDesign = CreateObject("InDesign.Application")
      2 Set newDocument = appInDesign.Documents.Add
      3 newDocument.DocumentPreferences.PageOrientation = idPageOrientation.idLandscape


      In line 3 it stops and tells me: "Object needed"


      Anybody any suggestions what I did wrong?






      Message was edited by: Cookie4ddict Just forgot to mention my versions XD I'm using Access 2007 and InDesign CS5