{"action":"closed","issue":{"url":"https://api.github.com/repos/khchen/winim/issues/17","repository_url":"https://api.github.com/repos/khchen/winim","labels_url":"https://api.github.com/repos/khchen/winim/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/khchen/winim/issues/17/comments","events_url":"https://api.github.com/repos/khchen/winim/issues/17/events","html_url":"https://github.com/khchen/winim/issues/17","id":351163592,"node_id":"MDU6SXNzdWUzNTExNjM1OTI=","number":17,"title":"comparasion for word's papersize","user":{"login":"retsyo","id":7960913,"node_id":"MDQ6VXNlcjc5NjA5MTM=","avatar_url":"https://avatars2.githubusercontent.com/u/7960913?v=4","gravatar_id":"","url":"https://api.github.com/users/retsyo","html_url":"https://github.com/retsyo","followers_url":"https://api.github.com/users/retsyo/followers","following_url":"https://api.github.com/users/retsyo/following{/other_user}","gists_url":"https://api.github.com/users/retsyo/gists{/gist_id}","starred_url":"https://api.github.com/users/retsyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retsyo/subscriptions","organizations_url":"https://api.github.com/users/retsyo/orgs","repos_url":"https://api.github.com/users/retsyo/repos","events_url":"https://api.github.com/users/retsyo/events{/privacy}","received_events_url":"https://api.github.com/users/retsyo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-16T11:24:59Z","updated_at":"2018-08-17T01:26:55Z","closed_at":"2018-08-17T01:26:55Z","author_association":"NONE","body":"first, I made a word file which has papersize A4\r\n```nim\r\nimport winim/com\r\n\r\nvar word = CreateObject(\"Word.Application\")\r\nvar fn = r\"r:\\test.docx\"\r\n\r\nword.Documents.open(fn, false, True,)\r\n\r\nvar objDoc = word.ActiveDocument\r\n\r\nvar PaperSizeA4=word.wdPaperSize.wdPaperA4\r\nvar pageSetup = objDoc.Sections(1).PageSetup\r\n\r\necho \"pageSetup.PaperSize=\", pageSetup.PaperSize, \" PaperSize=\", PaperSizeA4\r\n# will show `pageSetup.PaperSize=7 PaperSize=7`\r\n\r\necho pageSetup.PaperSize != PaperSizeA4\r\n# will show `true`\r\n\r\nif pageSetup.PaperSize != PaperSizeA4:\r\n    echo \"not same\"\r\n    # this will show\r\n\r\nobjDoc.Close(word.wdSaveOptions.wdDoNotSaveChanges)\r\nword.quit()\r\nCOM_FullRelease()\r\n```\r\ndisplays\r\n```\r\npageSetup.PaperSize=7 PaperSize=7\r\ntrue\r\nnot same\r\n```\r\n\r\nwhy this papersize A4 is not same as that A4?\r\n"}}
{"actor":{"display_login":"khchen"}}