Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
要求Excel宏使用VBA将数据从Excel复制到power point_Vba_Excel_Powerpoint - Fatal编程技术网

要求Excel宏使用VBA将数据从Excel复制到power point

要求Excel宏使用VBA将数据从Excel复制到power point,vba,excel,powerpoint,Vba,Excel,Powerpoint,我不熟悉VBA,我需要这方面的帮助,我不知道需要多长时间,我需要做些什么,任何帮助都将不胜感激 摘要-基本要求excel宏在指定的某些excel工作表中循环,并将这些工作表中的数据粘贴到现有power point演示文稿中,或创建新演示文稿,并将每个工作表数据作为图片粘贴到单个幻灯片上 主要详情如下: 1)。每个Excel工作表将包含1个Excel表格或Excel图表 2)。Excel表格或图表将在Excel中的周围设置一个打印区域。这就是VBA代码如何知道在每张图纸上复制什么。它需要在每张纸上

我不熟悉VBA,我需要这方面的帮助,我不知道需要多长时间,我需要做些什么,任何帮助都将不胜感激

摘要-基本要求excel宏在指定的某些excel工作表中循环,并将这些工作表中的数据粘贴到现有power point演示文稿中,或创建新演示文稿,并将每个工作表数据作为图片粘贴到单个幻灯片上

主要详情如下:

1)。每个Excel工作表将包含1个Excel表格或Excel图表

2)。Excel表格或图表将在Excel中的周围设置一个打印区域。这就是VBA代码如何知道在每张图纸上复制什么。它需要在每张纸上复制设置的打印区域,并粘贴在单独的power point幻灯片中作为图片

3)。在版本1中,它将创建一个新的power point幻灯片并粘贴到单个幻灯片中。我们可以指定高度和宽度要求,以确定粘贴到power point时图片的大小。在这个版本中,我们可以为粘贴的图片指定一个通用的高度和宽度要求

4)。代码需要使用Excel和PowerPoint 2010。我相信2007年是非常相似的,为这些版本编写的代码也可以在2010年使用


提前感谢您的帮助。:)

嗯->我刚在谷歌上搜索了“PPT vba开始新的演示文稿”,你知道什么。。。我找到了这个。这可能不是你所需要的100%,但它肯定会让你开始一个大的方式。在代码运行后,如果您需要帮助调整,请发布一个单独的问题,我们可以提供帮助!斯科特已经给了你一个很好的链接。然而,我想补充一个非常重要的事实。如果您计划使文件同时适用于2007/2010,那么不要像链接中提到的那样进行早期绑定,而是选择后期绑定。
Option Compare Database

Private Sub Command3_Click()
Call findField(Text1.Value)
End Sub

Public Function findField(p_myFieldName)
    Dim db As Database, _
        tb As TableDef, _
        fd As Field

    Set db = CurrentDb

    ''''''Clearing the contents of the table
    DoCmd.RunSQL " Delete from Field_Match_Found"

    For Each tb In db.TableDefs
        For Each fd In tb.Fields
            If fd.Name = p_myFieldName Then

                'MsgBox ("Table " & tb.Name & " has the field " & fd.Name)

                strsql = "INSERT INTO Field_Match_Found Values (""" & tb.Name & """, """ & fd.Name & """)"
                DoCmd.RunSQL strsql

            End If
        Next fd
    Next tb
    Set fd = Nothing
    Set tb = Nothing
    Set db = Nothing

    ''''''''Checking if any match found for the specified field or not
    If DCount("Table_name", "Field_Match_Found") = 0 Then
    MsgBox ("No match found in your database")
    Else
    MsgBox ("Check Table Field_Match_Found for your output")
    End If

    '''''''''''clearing the text box for the next time
    Me.Text1.Value = ""

End Function


Private Sub Form_Load()
Me.Text1.Value = ""
End Sub