回答編集履歴
1
追記
test
CHANGED
@@ -29,3 +29,59 @@
|
|
29
29
|
|
30
30
|
|
31
31
|
どうでしょうか?
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
---
|
36
|
+
|
37
|
+
【追記】下記でどうでしょうか?(質問のコードの抜粋の修正版です)
|
38
|
+
|
39
|
+
```vba
|
40
|
+
|
41
|
+
'フォルダ内のファイルを取得
|
42
|
+
|
43
|
+
For Each f In FSO.GetFolder(openFilePath).Files
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
'ファイル名の取得
|
48
|
+
|
49
|
+
fn = f.Name
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
'拡張子 pptx で判別
|
54
|
+
|
55
|
+
If FSO.GetExtensionName(openFilePath & "\" & fn) = "pptx" Then
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
'コピー元ファイルを開く
|
60
|
+
|
61
|
+
Presentations.Open (openFilePath & "\" & fn)
|
62
|
+
|
63
|
+
set sld_org = ActivePresentation.Slides(1) 'スライド1を指定
|
64
|
+
|
65
|
+
sld_org.Copy
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
'コピー先へ貼り付け
|
70
|
+
|
71
|
+
With myPtt.Slides.Paste
|
72
|
+
|
73
|
+
.Design = sld_org.Design
|
74
|
+
|
75
|
+
.ColorScheme = sld_org.ColorScheme
|
76
|
+
|
77
|
+
.DisplayMasterShapes = sld_org.DisplayMasterShapes
|
78
|
+
|
79
|
+
.FollowMasterBackground = sld_org.FollowMasterBackground
|
80
|
+
|
81
|
+
End With
|
82
|
+
|
83
|
+
End If
|
84
|
+
|
85
|
+
Next f
|
86
|
+
|
87
|
+
```
|