Class Link
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
লিঙ্ক একটি হাইপারটেক্সট লিঙ্ক।
বিস্তারিত ডকুমেন্টেশন
get Link Type()
Link Type
প্রদান করে।
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];
const link = shape.getLink();
if (link != null) {
Logger.log(`Shape has a link of type: ${link.getLinkType()}`);
}
প্রত্যাবর্তন
Link Type
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
get Linked Slide()
অ-ইউআরএল লিঙ্কের প্রকারের জন্য লিঙ্ক করা Slide
ফেরত দেয়, যদি এটি বিদ্যমান থাকে। উপস্থাপনায় স্লাইডটি বিদ্যমান না থাকলে বা Link Type
Link Type.URL
হলে null
দেয়।
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];
const link = shape.getLink();
if (link != null && link.getLinkType() !== SlidesApp.LinkType.URL) {
Logger.log(`Shape has link to slide: ${link.getLinkedSlide()}`);
}
প্রত্যাবর্তন
Slide
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
get Slide Id()
Link Type
Link Type.SLIDE_ID
না হলে লিঙ্কযুক্ত Slide
ID বা null
ফেরত দেয়।SLIDE_ID।
মনে রাখবেন যে প্রত্যাবর্তিত আইডি সহ স্লাইডটি বিদ্যমান নাও থাকতে পারে।
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];
const link = shape.getLink();
if (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_ID) {
Logger.log(`Shape has link to slide with ID: ${link.getSlideId()}`);
}
প্রত্যাবর্তন
String
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
get Slide Index()
Link Type
Link Type.SLIDE_INDEX
না হলে লিঙ্কযুক্ত Slide
শূন্য-ভিত্তিক সূচক বা null
ফেরত দেয়।SLIDE_INDEX।
উল্লেখ্য যে প্রত্যাবর্তিত সূচকের স্লাইডটি বিদ্যমান নাও থাকতে পারে।
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];
const link = shape.getLink();
if (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_INDEX) {
Logger.log(`Shape has link to slide with index: ${link.getSlideIndex()}`);
}
প্রত্যাবর্তন
Integer
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
get Slide Position()
Link Type
Link Type.SLIDE_POSITION
না হলে লিঙ্ক করা Slide
Slide Position
বা null
রিটার্ন করে।SLIDE_POSITION।
মনে রাখবেন যে প্রত্যাবর্তিত আপেক্ষিক অবস্থান সহ স্লাইডটি বিদ্যমান নাও থাকতে পারে।
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];
const link = shape.getLink();
if (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_POSITION) {
Logger.log(
`Shape has link to slide with relative position: ${
link.getSlidePosition()}`,
);
}
প্রত্যাবর্তন
Slide Position
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
get Url()
বাহ্যিক ওয়েব পৃষ্ঠায় URL ফেরত দেয় বা null
Link Type
Link Type.URL
না হলে।
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];
const link = shape.getLink();
if (link != null && link.getLinkType() === SlidesApp.LinkType.URL) {
Logger.log(`Shape has link to URL: ${link.getUrl()}`);
}
প্রত্যাবর্তন
String
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eA \u003ccode\u003eLink\u003c/code\u003e object represents a hypertext link associated with a shape in Google Slides.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to determine the link type, retrieve linked slide information (if applicable), and access the URL for external web page links.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetLinkType()\u003c/code\u003e method identifies the type of link, such as URL, slide ID, or slide index.\u003c/p\u003e\n"],["\u003cp\u003eMethods like \u003ccode\u003egetLinkedSlide()\u003c/code\u003e, \u003ccode\u003egetSlideId()\u003c/code\u003e, \u003ccode\u003egetSlideIndex()\u003c/code\u003e, and \u003ccode\u003egetSlidePosition()\u003c/code\u003e retrieve information about linked slides based on the link type.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetUrl()\u003c/code\u003e method returns the URL if the link type is \u003ccode\u003eURL\u003c/code\u003e, otherwise, it returns \u003ccode\u003enull\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class Link\n\nLink\n\nA hypertext link. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [getLinkType()](#getLinkType()) | [LinkType](/apps-script/reference/slides/link-type) | Returns the [LinkType](/apps-script/reference/slides/link-type). |\n| [getLinkedSlide()](#getLinkedSlide()) | [Slide](/apps-script/reference/slides/slide) | Returns the linked [Slide](/apps-script/reference/slides/slide) for non-URL links types, if it exists. |\n| [getSlideId()](#getSlideId()) | `String` | Returns the ID of the linked [Slide](/apps-script/reference/slides/slide) or `null` if the [LinkType](/apps-script/reference/slides/link-type) is not [LinkType.SLIDE_ID](/apps-script/reference/slides/link-type#SLIDE_ID). |\n| [getSlideIndex()](#getSlideIndex()) | `Integer` | Returns the zero-based index of the linked [Slide](/apps-script/reference/slides/slide) or `null` if the [LinkType](/apps-script/reference/slides/link-type) is not [LinkType.SLIDE_INDEX](/apps-script/reference/slides/link-type#SLIDE_INDEX). |\n| [getSlidePosition()](#getSlidePosition()) | [SlidePosition](/apps-script/reference/slides/slide-position) | Returns the [SlidePosition](/apps-script/reference/slides/slide-position) of the linked [Slide](/apps-script/reference/slides/slide) or `null` if the [LinkType](/apps-script/reference/slides/link-type) is not [LinkType.SLIDE_POSITION](/apps-script/reference/slides/link-type#SLIDE_POSITION). |\n| [getUrl()](#getUrl()) | `String` | Returns the URL to the external web page or `null` if the [LinkType](/apps-script/reference/slides/link-type) is not [LinkType.URL](/apps-script/reference/slides/link-type#URL). |\n\nDetailed documentation\n----------------------\n\n### `get``Link``Type()`\n\nReturns the [LinkType](/apps-script/reference/slides/link-type).\n\n```javascript\nconst shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];\nconst link = shape.getLink();\nif (link != null) {\n Logger.log(`Shape has a link of type: ${link.getLinkType()}`);\n}\n```\n\n#### Return\n\n\n[LinkType](/apps-script/reference/slides/link-type)\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n### `get``Linked``Slide()`\n\nReturns the linked [Slide](/apps-script/reference/slides/slide) for non-URL links types, if it exists. Returns `null` if\nthe slide doesn't exist in the presentation, or if the [LinkType](/apps-script/reference/slides/link-type) is [LinkType.URL](/apps-script/reference/slides/link-type#URL).\n\n```javascript\nconst shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];\nconst link = shape.getLink();\nif (link != null && link.getLinkType() !== SlidesApp.LinkType.URL) {\n Logger.log(`Shape has link to slide: ${link.getLinkedSlide()}`);\n}\n```\n\n#### Return\n\n\n[Slide](/apps-script/reference/slides/slide)\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n### `get``Slide``Id()`\n\nReturns the ID of the linked [Slide](/apps-script/reference/slides/slide) or `null` if the [LinkType](/apps-script/reference/slides/link-type) is not\n[LinkType.SLIDE_ID](/apps-script/reference/slides/link-type#SLIDE_ID).\n\nNote that the slide with the returned ID might not exist.\n\n```javascript\nconst shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];\nconst link = shape.getLink();\nif (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_ID) {\n Logger.log(`Shape has link to slide with ID: ${link.getSlideId()}`);\n}\n```\n\n#### Return\n\n\n`String`\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n### `get``Slide``Index()`\n\nReturns the zero-based index of the linked [Slide](/apps-script/reference/slides/slide) or `null` if the [LinkType](/apps-script/reference/slides/link-type) is not [LinkType.SLIDE_INDEX](/apps-script/reference/slides/link-type#SLIDE_INDEX).\n\nNote that the slide at the returned index might not exist.\n\n```javascript\nconst shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];\nconst link = shape.getLink();\nif (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_INDEX) {\n Logger.log(`Shape has link to slide with index: ${link.getSlideIndex()}`);\n}\n```\n\n#### Return\n\n\n`Integer`\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n### `get``Slide``Position()`\n\nReturns the [SlidePosition](/apps-script/reference/slides/slide-position) of the linked [Slide](/apps-script/reference/slides/slide) or `null` if the [LinkType](/apps-script/reference/slides/link-type) is not [LinkType.SLIDE_POSITION](/apps-script/reference/slides/link-type#SLIDE_POSITION).\n\nNote that the slide with the returned relative position might not exist.\n\n```javascript\nconst shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];\nconst link = shape.getLink();\nif (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_POSITION) {\n Logger.log(\n `Shape has link to slide with relative position: ${\n link.getSlidePosition()}`,\n );\n}\n```\n\n#### Return\n\n\n[SlidePosition](/apps-script/reference/slides/slide-position)\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n### `get``Url()`\n\nReturns the URL to the external web page or `null` if the [LinkType](/apps-script/reference/slides/link-type) is not [LinkType.URL](/apps-script/reference/slides/link-type#URL).\n\n```javascript\nconst shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0];\nconst link = shape.getLink();\nif (link != null && link.getLinkType() === SlidesApp.LinkType.URL) {\n Logger.log(`Shape has link to URL: ${link.getUrl()}`);\n}\n```\n\n#### Return\n\n\n`String`\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`"]]