{"id":14070822,"url":"https://github.com/yas78/QRCodeLibVBA","last_synced_at":"2025-07-30T08:32:51.300Z","repository":{"id":54739459,"uuid":"106236028","full_name":"yas78/QRCodeLibVBA","owner":"yas78","description":"QR Code generator library in VBA","archived":false,"fork":false,"pushed_at":"2023-03-12T06:03:40.000Z","size":38810,"stargazers_count":90,"open_issues_count":0,"forks_count":29,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-13T07:18:19.857Z","etag":null,"topics":["qrcode-generator","vb6","vba","vba-excel"],"latest_commit_sha":null,"homepage":null,"language":"VBA","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yas78.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-09T04:19:06.000Z","updated_at":"2024-07-28T00:53:01.000Z","dependencies_parsed_at":"2024-08-13T07:17:57.484Z","dependency_job_id":null,"html_url":"https://github.com/yas78/QRCodeLibVBA","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yas78%2FQRCodeLibVBA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yas78%2FQRCodeLibVBA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yas78%2FQRCodeLibVBA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yas78%2FQRCodeLibVBA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yas78","download_url":"https://codeload.github.com/yas78/QRCodeLibVBA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228110873,"owners_count":17871250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["qrcode-generator","vb6","vba","vba-excel"],"created_at":"2024-08-13T07:08:06.908Z","updated_at":"2024-12-04T12:32:25.063Z","avatar_url":"https://github.com/yas78.png","language":"VBA","funding_links":[],"categories":["VBA"],"sub_categories":[],"readme":"# QRCodeLibVBA\nQRCodeLibVBAは、Excel VBAで書かれたQRコード生成ライブラリです。  \nJIS X 0510:2004に基づくモデル2コードシンボルを生成します。\n\n## 特徴\n- 数字・英数字・8ビットバイト・漢字モードに対応しています\n- 分割QRコードを作成可能です\n- BMP、EMF、GIF、PNG、SVG、TIFFファイルに保存可能です\n- QRコードをIPictureDispオブジェクトとして取得可能です  \n- 配色を指定可能です\n- 文字セットを指定可能です\n- QRコードをクリップボードに保存可能です\n\n\n## クイックスタート\nQRCodeLib.xlamを参照設定してください。  \n\n\n## 使用方法\n### 例１．最小限のコードを示します\n\n```VBA\nDim sbls As Symbols\nSet sbls = CreateSymbols()\nsbls.AppendText \"012345abcdefg\"\n\nDim pict As stdole.IPictureDisp\nSet pict = sbls(0).GetPicture()\n```\n\n### 例２．誤り訂正レベルを指定する\nCreateSymbols関数の引数に、ErrorCorrectionLevel列挙型の値を設定してSymbolsオブジェクトを生成します。\n\n```VBA\nDim sbls As Symbols\nSet sbls = CreateSymbols(ErrorCorrectionLevel.L) ' 7%\nSet sbls = CreateSymbols(ErrorCorrectionLevel.M) ' 15%(default)\nSet sbls = CreateSymbols(ErrorCorrectionLevel.Q) ' 25%\nSet sbls = CreateSymbols(ErrorCorrectionLevel.H) ' 30%\n```\n\n### 例３．型番の上限を指定する\nCreateSymbols関数のmaxVer引数を設定してSymbolsオブジェクトを生成します。\n\n```VBA\nDim sbls As Symbols\nSet sbls = CreateSymbols(maxVer:=10)\n```\n\n### 例４．文字セットを指定する\nCreateSymbols関数のcharsetName引数を設定してSymbolsオブジェクトを生成します。\n（ADODB.Stream に依存しています。使用可能な文字セットはレジストリ[HKEY_CLASSES_ROOT\\MIME\\Database\\Charset]を確認してください。）\n\n既定値はShift_JISです。UTF-8の設定例を以下に示します。\n\n\n```VBA\nDim sbls As Symbols\nSet sbls = CreateSymbols(charsetName:=\"UTF-8\")\n```\n\n### 例５．分割QRコードを作成する\nCreateSymbols関数の引数を設定してSymbolsオブジェクトを生成します。型番の上限を指定しない場合は、型番40を上限に分割されます。  \n\n型番1を上限に分割し、各QRコードのIPictureDispオブジェクトを取得する例を示します。\n\n```VBA\nDim sbls As Symbols\nSet sbls = CreateSymbols(maxVer:=1, allowStructuredAppend:=True)\nsbls.AppendText \"abcdefghijklmnopqrstuvwxyz\"\n    \nDim pict As stdole.IPictureDisp\nDim sbl As Symbol\n    \nFor Each sbl In sbls\n    Set pict = sbl.GetPicture()\nNext\n```\n\n### 例６．画像形式を指定してIPictureDispオブジェクトを取得する\nGetPictureメソッドのpicType引数を設定します。\n\n```VBA\nDim sbls As Symbols\nSet sbls = CreateSymbols()\nsbls.AppendText \"012345abcdefg\"\n\nDim pict As stdole.IPictureDisp\n\n' Bitmap\nSet pict = sbls(0).GetPicture(picType:=Bitmap)\n\n' Metafile\nSet pict = sbls(0).GetPicture(picType:=EnhMetaFile)\n```\n\n### 例７．ファイルへ保存する\nSymbolクラスのSaveAsメソッドを使用します。\n\n```VBA\nDim sbls As Symbols\nSet sbls = CreateSymbols()\nsbls.AppendText \"012345abcdefg\"\n    \n' monochrome BMP\nsbls(0).SaveAs \"filename\"\n\n' true color BMP\nsbls(0).SaveAs \"filename\", fmt:=fmtTrueColor\n\n' EMF\nsbls(0).SaveAs \"filename\", fmt:=fmtEMF\n\n' GIF\nsbls(0).SaveAs \"filename\", fmt:=fmtGIF\n\n' transparent GIF\nsbls(0).SaveAs \"filename\", fmt:=fmtGIF, bkStyle:=bkTransparent\n\n' monochrome PNG\nsbls(0).SaveAs \"filename\", fmt:=fmtPNG\n\n' true color PNG \nsbls(0).SaveAs \"filename\", fmt:=fmtPNG + fmtTrueColor\n\n' transparent PNG \nsbls(0).SaveAs \"filename\", fmt:=fmtPNG + fmtTrueColor, bkStyle:=bkTransparent\n\n' SVG\nsbls(0).SaveAs \"filename\", fmt:=fmtSVG\n\n' monochrome TIFF\nsbls(0).SaveAs \"filename\", fmt:=fmtTIFF\n\n' true color TIFF\nsbls(0).SaveAs \"filename\", fmt:=fmtTIFF + fmtTrueColor\n\n' bilevel TIFF\nsbls(0).SaveAs \"filename\", fmt:=fmtTIFF + fmtBilevel\n\n' 10 pixels per module\nsbls(0).SaveAs \"filename\", moduleSize:=10\n    \n' specify foreground and background colors\nsbls(0).SaveAs \"filename\", foreRgb:=\"#0000FF\", backRgb:=\"#FFFF00\"\n```\n\n### 例８．クリップボードへ保存する\nSymbolクラスのSetToClipBoardメソッドを使用します。\n\n```VBA\nDim sbls As Symbols\nSet sbls = CreateSymbols()\nsbls.AppendText \"012345abcdefg\"\n\n' Bitmap \nsbls(0).SetToClipBoard\n\n' Metafile\nsbls(0).SetToClipboard fmt:=fmtEMF\n```\n\n### 例９．型番を固定して画像サイズを一定にする\nCreateSymbols関数のmaxVer引数とfixedSize引数を設定してSymbolsオブジェクトを生成します。  \n常にmaxVer引数で指定された型番で生成されます。  \n型番10に固定する例を以下に示します。\n\n```VBA\nDim sbls As Symbols\nSet sbls = CreateSymbols(maxVer:=10, fixedSize:=True)\nsbls.AppendText \"Hello World\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyas78%2FQRCodeLibVBA","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyas78%2FQRCodeLibVBA","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyas78%2FQRCodeLibVBA/lists"}